#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
-(void)loadView{
NSLog(@"%@",@"loadview");
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
// Do any additional setup after loading the view, typically from a nib.
}
对于直接在viewController中写这些代码会引起程序崩溃,具体原因分析欢迎大家给出原因
loadView什么时候执行呢?
答案是:某位大神说是self.view的时候执行,到底是不是呢?