ios 控制器的生命周期

#pragma mark - 控制器生命周期

 

// 视图将要出现

- (void)viewWillAppear:(BOOL)animated {

    [super viewWillAppear:animated];

    NSLog(@"%s", __func__);

}

// 视图已经出现

- (void)viewDidAppear:(BOOL)animated {

    [super viewDidAppear:animated];

    NSLog(@"%s", __func__);

}

// 视图将要消失

- (void)viewWillDisappear:(BOOL)animated {

    [super viewWillDisappear:animated];

    NSLog(@"%s", __func__);

}

// 视图已经消失

- (void)viewDidDisappear:(BOOL)animated {

    [super viewDidDisappear:animated];

    NSLog(@"%s", __func__);

}

// 视图已经布局子视图完成

- (void)viewDidLayoutSubviews {

    [super viewDidLayoutSubviews];

    NSLog(@"%s", __func__);

}

posted on 2015-08-19 20:13  Hwangkop  阅读(173)  评论(0编辑  收藏  举报

导航