Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.

Paste

Pasted as Swift by DrPatience ( 6 years ago )
class PlayerView: UIView  {
    
    @IBOutlet weak var contentView: UIView!
   
    override init(frame: CGRect) {
        super.init(frame: frame)
        commonInit()
    }
    
    required init?(coder: NSCoder) {
        super.init(coder: coder)
        commonInit()
        fatalError("init(coder:) has not been implemented")
    }
    
    private func commonInit() {
        Bundle.main.loadNibNamed(
            "PlayerView",
            owner: self,
            options: nil
        )
        contentView.frame = self.bounds
 
    }
}

 

Revise this Paste

Your Name: Code Language: