Framework

UIKit

Construct and manage a graphical, event-driven user interface for your iOS or tvOS app.

Overview

The UIKit framework provides the required infrastructure for your iOS or tvOS apps. It provides the window and view architecture for implementing your interface, the event handling infrastructure for delivering Multitouch and other types of input to your app, and the main run loop needed to manage interactions among the user, the system, and your app. Other features offered by the framework include animation support, document support, drawing and printing support, information about the current device, text management and display, search support, accessibility support, app extension support, and resource management.

Topics

First Steps

About App Development with UIKit

Learn about the basic support that UIKit and Xcode provide for your iOS and tvOS apps.

App Structure

UIKit manages your app's interactions with the system and provides classes for you to manage your app's data and resources.

Core App

Manage your app's data model and its interactions with the system.

Resource Management

Manage the images, strings, storyboards, and nib files that you store outside your main executable.

App Extensions

Extend your app's basic functionality to other parts of the system.

User Interface

Views help you display content onscreen and facilitate user interactions; view controllers help you manage views and the structure of your interface.

Views and Controls

Present your content onscreen and define the interactions allowed with that content.

View Management

Manage your interface using view controllers and facilitate navigation around different screens of content.

System View Controllers

Use the built-in UIKit view controllers to pick images, edit videos, share content, print files, and much more.

Drag and Drop

Bring drag and drop to your app by using interaction APIs with your views.

Accessibility

Make your app more accessible to users with disabilities.

Animation and Haptics

Provide feedback to users using view-based animations and haptics.

Windows and Screens

Provide a container for your view hierarchies and other content.

Event Handling

Responders and gesture recognizers help you handle Multitouch, button-tap, and 3D Touch events, keyboard input, custom input, and custom actions.

Understanding Event Handling, Responders, and the Responder Chain

Learn how events are propagated through your app and how you handle them.

Touches, Presses, and Gestures

Encapsulate your app's event-handling logic in gesture recognizers so that you can reuse that code throughout your app.

Peek and Pop

Use 3D Touch input to display custom previews and actions for your content.

Keyboard and Menus

Handle keyboard input, and display a menu of custom actions.

Graphics, Drawing, and Printing

UIKit provides classes and protocols that help you configure your drawing environment and render your content.

Images and PDF

Create and manage images, including those that use bitmap and PDF formats.

Drawing

Configure your app's drawing environment using renderers, and draw paths, strings, and shadows.

Printing

Display the system print panels and manage the printing process.

Text

In addition to text views that make it easy to display text in your app, UIKit provides custom text management and rendering that supports the system keyboards.

Text Display and Fonts

Use UIKit views to display text, manage fonts, and check spelling.

Text Storage

Manage text storage, and coordinate the layout of text.

Keyboards and Input

Configure the system keyboard, or create your own keyboards and handle input yourself.

Deprecated

Avoid using deprecated classes and protocols in your apps.

Structures

struct UIDocumentBrowserError

A structure that contains information about document browser errors.