swift 自定义UIView (xib) VC访问不了其内部属性的低级错误记录

错误写法!!!

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访问不了其内部属性的低级错误记录)