PassionateDeveloper
PassionateDeveloper

Reputation: 15158

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 that view2 is shown.

How to manage this?

Upvotes: 0

Views: 89

Answers (1)

Felix
Felix

Reputation: 35394

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.

Upvotes: 1

Related Questions