美文网首页
ios xib加载View

ios xib加载View

作者: biubiuboom | 来源:发表于2017-11-29 15:19 被阅读4665次

    //xib 加载View

     override init(frame: CGRect) {
            super.init(frame: frame)
            let contentView = Bundle.main.loadNibNamed("JKLiveShareView", owner: self, options: nil)?.first as! UIView
            contentView.frame = frame
            self.addSubview(contentView)
            UIApplication.shared.keyWindow?.addSubview(self)
        }
        required init?(coder aDecoder: NSCoder) {
            fatalError("init(coder:) has not been implemented")
        }
        
    

    相关文章

      网友评论

          本文标题:ios xib加载View

          本文链接:https://www.haomeiwen.com/subject/mkaubxtx.html