Mobile Development

UIKit

Apple includes a variety of controls that help you build user interfaces using Interface Builder. These controls are found in the Object Library within Xcode.

Overview

Apple provides excellent overview documentation on UIKit here.

Views are the building blocks for constructing your user interface. Rather than using one view to present your content, you are more likely to use several views, ranging from simple buttons and text labels to more complex views such as table views, picker views, and scroll views. [1]

[Video] Introduction to UIKit

Introduction to UIKit


Common Controls

UIView

UIView is the basis for all views within iOS. Buttons, labels, tables are all subclasses of UIView.

The UIView class defines a rectangular area on the screen and the interfaces for managing the content in that area.

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/

UILabel

Use this class to draw one or multiple lines of static text, such as those you might use to identify other parts of your user interface.

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILabel_Class/

UIButton

A button intercepts touch events and sends an action message to a target object when tapped.

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIButton_Class/index.html

UITextField

A UITextField object is a control that displays editable text and sends an action message to a target object when the user presses the return button

Reference: https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UITextField_Class/index.html

UITextView

The UITextView class implements the behavior for a scrollable, multiline text region

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITextView_Class/index.html

UIScrollView

The UIScrollView ... enables users to scroll within that content by making swiping gestures, and to zoom in and back from portions of the content by making pinching gestures

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScrollView_Class/index.html

UITableView

The UITableView allows for a vertical, scrolling list of cells to be displayed.

A table view is made up of zero or more sections, each with its own rows. Sections are identified by their index number within the table view, and rows are identified by their index number within a section.

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableView_Class/index.html

UITableViewCell

Manages content within UITableView.

Includes properties and methods for setting and managing cell content and background (including text, images, and custom views), managing the cell selection and highlight state, managing accessory views, and initiating the editing of the cell contents

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableViewCell_Class/

UICollectionView

UICollectionViews are similar to UITableViews in that they display a series of cells. The extend the limitations of UITableView:

Collection views support customizable layouts that can be used to implement multi-column grids, tiled layouts, circular layouts, and many more. You can even change the layout of a collection view dynamically

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionView_class/index.html

UICollectionViewCell

A UICollectionViewCell object presents the content for a single data item when that item is within the collection view’s visible bounds.

Reference: https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UICollectionViewCell_class/index.html


Common Gestures

Below are three of the most common gesture recognizers Apple provides in UIKit. They are all derived from a common base class of UIGestureRecognizer.

[Video] iOS Tutorial - UIGestureRecognizer

iOS Tutorial - Part 21 - UIGestureRecognizer

https://www.youtube.com/watch?v=KnfQRy6xOPk

UITapGestureRecognizer

[UITapGestureRecognizer] looks for single or multiple taps. For the gesture to be recognized, the specified number of fingers must tap the view a specified number of times.

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITapGestureRecognizer_Class/index.html

UIPanGestureRecognizer

[UIPanGestureRecognizer] looks for panning (dragging) gestures. The user must be pressing one or more fingers on a view while they pan it.

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPanGestureRecognizer_Class/index.html

UILongPressGestureRecognizer

[UILongPressGestureRecognizer] looks for long-press gestures. The user must press one or more fingers on a view and hold them there for a minimum period of time before the action triggers.

Reference: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UILongPressGestureRecognizer_Class/index.html


References

[1] Apple - About Views https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/

[2] Apple UIKit Documentation https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIKit_Framework/

[3] Designing for iOS https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/

[4] Start Developing for iOS - User Interfaces https://developer.apple.com/library/prerelease/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson2.html