user836026
user836026

Reputation: 11362

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?

Upvotes: 0

Views: 218

Answers (1)

Sebastian Flückiger
Sebastian Flückiger

Reputation: 5555

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?

Upvotes: 1

Related Questions