'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "JZAdViewController" ni

1.问题复现

自己创建xib时没有进行相应配置会出现该问题,一般自己创建xib时,有两步操作:

1)设置File's Ower的class:

 

'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "JZAdViewController" ni

 

2)设置File's Ower的Outlets:

'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "JZAdViewController" ni

没有设置view的Outlets,就会报上面的错

 

2.解决办法

拖动view右边的小圆圈和view关联

 

'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "JZAdViewController" ni

 

这样就算成功了:

 

'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "JZAdViewController" ni

 

注意:创建时勾选创建xib文件不会出现该问题

'-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "JZAdViewController" ni

 

上一篇:C++中const关键字用法


下一篇:Http2