How to get all the application's ViewControllers in iOS?
问题 How can I get all the ViewControllers of my application at runtime? As far as I know self.navigationcontroller.viewControllers returns the NSArray of only those controllers which are on the navigation stack. But is there some way I can access all the my application's ViewControllers? 回答1: Hooking in on the answer of Umka. Without knowing exactly what you want to do, this might be totally overkill, but it might help you. You could subclass the UIViewController (e.g. the