开发者

viewDidAppear & viewWillAppear not firing in tabbar app

开发者 https://www.devze.com 2022-12-21 00:57 出处:网络
In a tab bar application, I\'m adding a view to my first tabbar view by doing: [self.view addSubview:anotherView.view];

In a tab bar application, I'm adding a view to my first tabbar view by doing:

[self.view addSubview:anotherView.view];

Once anotherView is done, I do:

    [self.view removeFromSuperview];

Which goes back to the parent but doesn't fire viewDidAppear or viewWillAppear on the parent. I can use messaging but it see开发者_开发技巧ms there must be a better way. Any suggestions?


When you add a subview to the first view, it's still visible, just behind the second view. Those methods don't fire because technically it's visible the whole time, even if it's completely covered by the second view.

0

精彩评论

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