Xcode Error:loaded some nib but the view outlet was not set解决
当使用 initWithNibName 函数, 并使用由nib文件生成的ViewController 的view属性时候,遇到这个问题。
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "CalibrateViewController" nib but the view outlet was not set.'
原因:
没有在xib中将view与File's Owner关联起来
解决办法:
啥也不说了,看图。
1、没有关联时,Referencing Outlets里是没有view的
2、关联后,Referencing Outlets多了view