1.如果vc都是通过xib来生成的,没什么问题,但是如果只是直接init生成的话,UIViewController会在loadview的时候自动创建一个view,赋值给vc的view,但是NSViewController不会自动创建view,需要自己在loadview中创建view。如果NSViewController不创建view的话,虽然走了loadview方法,但是由于(Called after the view has been loaded.)self.view没有被创建,所以导致viewDidLoad不会被创建!
/* Called after the view has been loaded. For view controllers created in code, this is after -loadView. For view controllers unarchived from a nib, this is after the view is set. Default does nothing.
*/
- (void)viewDidLoad NS_AVAILABLE_MAC(10_10);
未完待续......