In this recipe, we will learn how we can use the storyboard features to programmatically present view controllers within the storyboard.
In this recipe, we will look at how we can programmatically call another view controller within the storyboard by using its identifier.
In order to programmatically determine which view we are in, we will need to create a new UIViewController
subclass for our second view controller. This can be achieved by performing the following simple steps:
Select the
TwitterExample
folder from the project navigator.Select File | New | File… or press command + N.
Select the Objective-C class template from the list of templates.
Enter
SecondViewController
as the name of the class to create.Ensure that you have selected UIViewController as the type of subclass to create from the Subclass of drop-down list.
Ensure that the Targeted for iPad checkbox has not been checked.
Ensure that the With XIB...