IOS:导航栏 - 重新加载视图控制器

时间:2012-10-18 12:01:21

标签: iphone ios reload navigationbar

当我们从导航栏返回到viewcontroller时,是否有任何方法要发布?

当我从导航栏返回屏幕时,我想重新加载NIB。

有可能吗?

感谢

1 个答案:

答案 0 :(得分:2)

您可能需要查看viewWillAppear:animated中的viewDidAppear:animatedUIViewController方法。每次按下视图控制器进行显示时都会调用它们。

- (void)viewWillAppear:(BOOL)animated {

    [super viewWillAppear:animated];
    // Reload your data here, and this gets called
    // before the view transition is complete.
}

- (void)viewDidAppear:(BOOL)animated {

    [super viewDidAppear:animated];
    // Reload your data here, and this gets called
    // after the view transition is complete.
}