Updating Label on previously loaded view?
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.
精彩评论