您的位置:首页 > 其它

nib文件的默认搜索规则

2015-03-24 12:00 253 查看
  if you do not specify a nib name, and do not override the
loadView
method in your custom subclass, the view controller searches for a nib file using other means. Specifically, it looks for a nib file with an appropriate name (without the
.nib
extension)

If the view controller class name ends with the word ‘Controller’, as in
MyViewController
, it looks for a nib file whose name matches the class name without the word ‘€œController’, as in
MyView.nib
.

It looks for a nib file whose name matches the name of the view controller class. For example, if the class name is
MyViewController
, it looks for a
MyViewController.nib
file.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: