开发者

Reload View only when application is opened Again

开发者 https://www.devze.com 2023-03-06 06:49 出处:网络
My application has tab bar with one of the tabs having a segmented control on navigation bar. Based on segment clicked different viewis displayed using a url.

My application has tab bar with one of the tabs having a segmented control on navigation bar. Based on segment clicked different view is displayed using a url. I am calling the url in viewdidload method.I do not want to use viewwillAppear to call the url as it will be called each time the view is displayed. I only want to call the url again whenever user closes the application and comes back.

Whats the best way to do this.Sho开发者_StackOverflow社区uld I remove the view controller from and reload it again once the application is opened.


Please use a more descriptive title for your question next time!

There are notifications for this that you can observe in your application:

UIApplicationDidBecomeActiveNotification and UIApplicationWillEnterForegroundNotification come to mind.

0

精彩评论

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