美文网首页
iOS-UIKit-View & Xib

iOS-UIKit-View & Xib

作者: 枫枫大世界 | 来源:发表于2016-07-23 14:33 被阅读25次
  • initWithNibName 大多用于VC和Xib连起来 ,延迟加载,等vc显示出来的时候再初始化视图

  • loadNibNamed 大多是那种view和xib连起来 创建出来的时候所有视图已经初始化好了

when using loadNibNamed:owner:options:, the File's Owner should be NSObject, the main view should be your class type, and all outlets should be hooked up to the view, not the File's Owner

  • initWithCoder :initWithNibName 和 loadNibNamed 都会调用

  • awakeFromNib :xib文件加载的时候会触发

相关文章

网友评论

      本文标题:iOS-UIKit-View & Xib

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