View objects are the main way your application interacts with the user. 
Before we dive in, let's build our vocabulary associated with UIViews:
(x, y, width, height)
The difference between frame and bounds is the coordinate system the frame refers. As visualized below, frames refer to the parent view's coordinate system. Bounds refers to the view's own coordinate system:
The majority of time, you will be creating views within Interface Builder. They are automatically added to your view controllers, they are implicitly created with UIButtons and UILabels and of course, you can add them directly through the Object Library.
There may be times, however where it is important to create views within your code, outside of IB. The following code creates a simple view with a red background:
import UIKit var view = UIView() view.frame = CGRect(x: 0.0, y: 0.0, width: 100.0, height: 100.0) view.backgroundColor = UIColor.redColor()
The above codes output, as seen in Playgrounds:
Now that we've seen one view, let's see how views are displayed within a hierarchy.
An important concept of views is hierarchy. Views are layered on top of each other. In the below example, we see an UIView that contains an UIImageView, UITextView and a UIButton.
This hierarchy can be visualized using the Xcode Debug View Hierarchy:
Notice how each layer is either below, the same or above adjacent views. Planning your view hierarchy is crucial for good interface design.
 View Programming Guide for iOS - https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingViews/CreatingViews.html
 UIView Class Reference - https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html
 CGGeometry Reference - https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGGeometry/index.html
 View and Window Architecture - https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/WindowsandViews/WindowsandViews.html