How to do it...

  1. Create a new Xcode project with a Single View Application template and with name OnDemandDemo.
  2. Open Main.storyboard, and add two buttons on the initial view controller.
  3. Change the title of the first button to Dubai and the second button to Abu Dhabi. When a user clicks on either of these, a screen with images for that city should be displayed.
  4. Click on the initial view controller, and go to Edit | Embed In | Navigation Controller to embed it in your navigation controller.
  5. Drag a UIViewController from Object Library and place it beside the initial view controller. The name of this controller will be ImagesViewController.
  1. Create a segue from the initial view controller to ImagesViewController with the identifier showImages ...

Get iOS Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.