您的位置:首页 > 移动开发 > IOS开发

ios awakeFromNib 和 initWithCoder:

2015-07-16 10:23 465 查看
During the instantiation process, each object in the archive is unarchived and then initialized with the method befitting its type. Objects that conform to the
NSCoding
protocol (including all subclasses of
UIView
and
UIViewController
) are initialized using their
initWithCoder:
method. All objects that do not conform to the
NSCoding
protocol are initialized using their
init
method. After all objects have been instantiated and initialized, the nib-loading code reestablishes the outlet and action connections for all of those objects. It then calls the
awakeFromNib
method of the objects. For more detailed information about the steps followed during the nib-loading process, see Nib Files in Resource Programming Guide.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: