How to switch from one look to another?

I have a windows based application. What is the easiest way to switch from one view to another in this type of application?

0
source share
1 answer

If you are not using a navigation controller and you do not need to switch to another view controller, then something like this will simply switch the views:

[ myCurrentTopView removeFromSuperView ];

[ window addSubView: myNewView ];

To do this, you will need a link to the current top view (myCurrentTopView in the above example) and may want to make sure your myNewView object is selected, initialized, the correct frame size, etc. in advance.

0
source

All Articles