美文网首页
swift 自定义UIView (xib) VC访问不了其内部属

swift 自定义UIView (xib) VC访问不了其内部属

作者: 茗记西岭雪 | 来源:发表于2020-11-20 11:10 被阅读0次

错误写法!!!

var customView = Bundle.main.loadNibNamed("customView", owner: self, options: nil)?.last as! UIView

正确写法.. N C 了...

 var customView = Bundle.main.loadNibNamed("customView", owner: self, options: nil)?.last as! customView

相关文章

网友评论

      本文标题:swift 自定义UIView (xib) VC访问不了其内部属

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