Adding the SubscribeController View Controller

Goal: Create a view controller that functions as the root view screen for the SUP101 mobile application.

When you create the user interface, you assign a target action to a control object—in this example a Subscribe button so that a message (the action) is sent to another object (the target) in response to a user event, for example, a touch on the button. The view controller manages and configures the view when asked.

  1. In the SUP101 Xcode project, select File > New File.
  2. Select Cocoa Touch Class, UIViewController subclass, and With XIB for user interface. Then click Next.

    iPhone_new_uiviewcontroller

    The "With XIB for user interface" option creates a NextStep Interface Builder (nib) file to go with the view controller and adds it to the SUP101 Xcode project.

  3. In the next window, in File Name, enter SubscribeController.m, ensure Also create SubscribeController.h is selected, and click Finish.
    The new source files contain stub implementations of various methods.
Related tasks
Adding the CustomerListController
Adding the DetailController