开发者

how to tell what is the current UIView/UIController after an iPhone app in brought back to foreground?

After an iPhone app is put into background, then the user clicks on it again and it comes back to foreground, THEN

Question - How to tell what is the current UIView/UIController after an iPhone app in brought back to foreground?

I know that the application delegate's applicationDidBecomeActive method can be used to trap the return to foreground. I also know that each controller could subscribe via notification centre to UIApplicationDidBecomeActiveNotification.

But if what I want to do is reload the UI data in the UIView/UIControll开发者_如何学JAVAer that is displayed, and not carry out this same operation through all other view/controllers, how can I tell which is the one to do the reloadData on?


If your using a nav controller, you can use this:

self.navigationController.visibleViewController
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜