O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating MainMenuViewController

Creating a custom class for a table using static cells is much easier than creating one using dynamic cells. The system handles all the methods to determine number of sections, determine number of rows, and create cells. All you need is tableView:didSelectRowAtIndexPath: for acting on user selections. Add the functionality for the main menu by following these steps:

1. With the iPad folder selected, create a subclass of UITableViewController called MainMenuViewController.

2. In the .m file, replace the contents with the following:

#import "MainMenuViewController.h" #import "AppDelegate.h" @implementation MainMenuViewController - (void)viewDidLoad {     [super viewDidLoad]; }

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required