How to do it...

  1. Go to Xcode and create a new iOS project with template Single View Application. Set the name of the project to UIViews.
  2. Now, select the storyboard file and open the single page view controller:
  1. In the Attribute Inspector in the right-hand side bar, set the size of the View Controller to iPhone 4.7-inch size.
  2. Open the View Controller view, and from Object Library in the right-hand side bar, drag two UIViews. In the first UIView and from the Size Inspector tab in the right side bar, set the frame of the first one to (x = 0, y = 0, width = 375, height = 300), and from the Attribute Inspector tab, set red as the background color. ...

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.