开发者

How to Notify RootViewController of View Changes

开发者 https://www.devze.com 2023-03-01 13:25 出处:网络
I have added a UIButton to a toolbar that is only accessible via the RootViewController (which has a navigation bar and toolbar) of my app. When navigating to another view, I hide the开发者_开发知识库

I have added a UIButton to a toolbar that is only accessible via the RootViewController (which has a navigation bar and toolbar) of my app. When navigating to another view, I hide the开发者_开发知识库 UIButton, but when I go back to the initial screen (a map view) the UIButton remains hidden and I must unhide it. Since it is the RootViewController I am doing this in, viewWillAppear is not called, so I cannot use that method.

I am wondering if there is any way the RootViewController knows when a view is being popped off the navigationController stack, if so, how would you suggest I check for this? Is there any way you would recommend implementing this?

Thanks in advance!


if your app using UINavigationController for navigation then viewWillAppear will obviously called

0

精彩评论

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

关注公众号