开发者

reloading uiviewcontroller

开发者 https://www.devze.com 2023-02-23 18:14 出处:网络
Am using UINavigationController for navigation between UIVi开发者_Go百科ewControllers. But got some problem, and am not able to get solution for that.

Am using UINavigationController for navigation between UIVi开发者_Go百科ewControllers. But got some problem, and am not able to get solution for that.

Here comes the issue - When I navigate back to parent controller, the table in parent controller should get reloaded. I used Interface Builder in the application. Please help in this issue.

Thanks in advance...


When using a UINavigationController, you may use the UINavigationControllerDelegate methods

- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated

Within both of those methods, you could call the viewWillAppear and viewDidAppear manually.


You could use the viewDidAppear or viewWillAppear methods of the first view controller and put your reload code there.


Use the - (void) viewWillAppear method in order to do this. Here you can put all the method calls that you want to reload when the view is loaded.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号