iOS: Call a method in MainWindow from a View?
Simple question:
My MainWindows organize all Views I use.
When I click a button on view1 i want th开发者_JAVA百科at view2 is shown.
How to manage this?
You typically manage the views within a UIViewController subclass. If you created the views with Interface Builder you must connect them to the view controller by an IBOutlet so you can access them in code. Then in the button handler method you can simply set the view's hidden property to YES to hide a view or NO to show it.
精彩评论