开发者

Updating Label on previously loaded view?

开发者 https://www.devze.com 2022-12-26 15:57 出处:网络
I am working on a simple app tab-bar based application that has two views. The first is the main application and the second is a simple instruction screen. What I am trying to do is update a label on

I am working on a simple app tab-bar based application that has two views. The first is the main application and the second is a simple instruction screen. What I am trying to do is update a label on that second screen as things change in the main app. B开发者_C百科ecause the second screen is only simple with one label and some text I am not unloading it once its loaded. After the first viewDidLoad I can update the label just fine, but after that is there a way to catch successive view switches (when the view is not loaded) from the tab-bar menu so I can update the label next time the view is swapped?

many thanks

gary


Put code in the viewWillAppear: method - this is called every time the view appears, including when a user switches to it using a tab bar.

0

精彩评论

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