Graphics Programs Reference
In-Depth Information
Right now, every view controller in the storyboard is a standard instance of
UIViewController
or one of its standard subclasses. We cannot write code for any of
these as they are. To write code for a view controller in a storyboard, you have to create a
subclass of
UIViewController
and specify in the storyboard that the view controller
is an instance of your subclass.
Let's create a new
UIViewController
subclass to see how this works. Create a new
file from the
UIViewController
template. Name it
ModalViewController
and
configure it as shown in
Figure 24.14
.
Figure 24.14 ModalViewController
In
ModalViewController.h
, declare a new
IBAction
.
@interface ModalViewController : UIViewController