How to Add Destination Support to the iPhone Storyboard in Your iOS App

By Neal Goldstein, Dave Wilson

Your goal is to add a Destination scene to your iPhone storyboard in your iOS app in the same way that you added one to your iPad storyboard file. Follow the same directions for creating the Destination Controller scene for iPad storyboard. Steps include the following:

  1. Drag a UIViewController into the iPhone storyboard.

  2. Use the Inspector to change the class name to DestinationController as well as the Storyboard ID and Title to Destination.

  3. Drag a Modal segue from the Destination table cell in the MasterViewController to the DestinationController. Set the segue ID to Destination.

  4. Add the Navigation bar, and then place a Cancel button in it.

  5. Choose the DestinationController’s cancel action for the Cancel button.

  6. Add a UIImageView with an image.

  7. Add a Label “Pick a Place, Anyplace.”

  8. Add a Table view.

  9. Set the Table view’s delegate and dataSource to be the DestinationController.

  10. Connect the Table view to the destinationTableView property in Destination.m.

  11. Format the Table View cell.

The good news is that you don’t have to change your Objective-C code at all — the same DestinationController code works fine.