I’m new to Objective-C programming and I’m having a little trouble understanding how I transition between two views.
Basically, I have my main view (the view that loads up when the application opens) and I want to transition to a new view on pressing a button. The user will not need to go back to the main view after pressing the button — it’s basically a title screen.
Could someone please briefly explain the steps I would need to take to make this happen?
Thanks a lot.
You could make use of UIView’s class method transitionFromView:toView:duration:options:completion:.
A call to switch from viewA to viewB could look like this:
As you mentioned the user won’t get back to the mainView I added something to the completion parameter to get rid of viewA afterwards.
You can find the animation options in the constants of the UIView class documentation.