Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 30. Developing for iOS > RootViewController

RootViewController

Create a new UIViewController subclass called RootViewController. Check the option box labeled With XIB for user interface (Figure 30.5).

Figure 30.5. New UIViewController Subclass

Image

Open RootViewController.xib. In the Attributes Inspector for the view, under Simulated Metrics, set Top Bar to Navigation Bar (Figure 30.6). This sets the size of the view to be appropriate for a navigation bar.

Figure 30.6. Simulated Navigation Bar

Image

Drag a button and activity indicator onto the view. Set the button’s title to Fetch Classes, and set the activity indicator to Hides When Stopped (Figure 30.7).

Figure 30.7. Set the Activity Indicator to Hides When Stopped

Image

Now enable the Assistant Editor. This will simplify creating the outlets and actions that we need. Ensure that the Assistant Editor’s jump bar is set to Automatic; this will display RootViewController.h in the editor.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial