alloc -> initWithNibName -> loadView -> viewDidLoad -> viewWillAppear -> viewDidAppear -> viewWillDisappear -> viewDidDisappear -> dealloc
注意,不要在loadView中调用父类方法[super loadView],因为这会影响CPU性能。
注意2,切换前后台不会调用viewWillAppear