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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.