Book Image

Swift Essentials

By : Alex Blewitt, Bandlem Limited
Book Image

Swift Essentials

By: Alex Blewitt, Bandlem Limited

Overview of this book

Whether you are a seasoned Objective-C developer or new to the Xcode platform, Swift Essentials will provide you with all you need to know to get started with the language. Prior experience with iOS development is not necessary, but will be helpful to get the most out of the book.
Table of Contents (10 chapters)
9
Index

An overview of UIView


All iOS views are rooted in an Objective-C class called UIView, which comes from the UIKit framework/module. The UIView class represents a rectangular space that might be associated with UIWindow or constructed to represent an off-screen view. Views that perform user interactions are generally subclasses of UIControl. Both UIView and UIViewController inherit from the UIResponder class, which in turn inherits from NSObject.

Note

On Mac OS X, views are rooted in NSView and come from the AppKit framework. Otherwise, the two implementations are very similar.

A new Xcode project will be used to create custom view classes. Create a new project with a Tabbed View Application template called CustomViews. To start with a blank sheet, delete the generated view controllers and the associated FirstViewController and SecondViewController classes.