简体   繁体   中英

How would I know which ViewController is currently active

I would like to know which ViewController is currently the active one. in other words, the one shown to the user?

please phrase your question a little bit more precise. from what i understand you want to do, you could for example use notifications (Tutorial to Notifications) and broadcast the name/type/object of your current viewcontroller to your application, whenever a new controller gets created & active.

please see this similar question which has good answer as well: How can I know which ViewController is active?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM