The easiest method by far is to create a nib with File's Owner set to NSObject, containing one view containing your layout element.
Then
No need to do anything with the file's owner; it is even set to nil here.
使用Nib文件加载视图
本文介绍了一种简便的方法来通过Nib文件加载自定义视图。具体步骤包括创建包含布局元素的Nib文件,并将其所有者设置为NSObject。然后通过代码加载这个Nib文件,并将返回的对象添加到当前视图中。
2011-06-05
[通过Nib文件进行反序列化,得到对象]
The easiest method by far is to create a nib with File's Owner set to NSObject, containing one view containing your layout element.
Then
No need to do anything with the file's owner; it is even set to nil here.
by H.Jhorn

被折叠的 条评论
为什么被折叠?