You’ve just learned how to write an app with a simple user interface and basic behavior. At this point, you may be thinking about implementing additional behavior that will turn your project into a full-featured app.
As you consider which features you want to add, remember that you don’t have to implement everything from scratch. iOS provides frameworks that define particular sets of functionality—from gaming and media to security and data management—which you can integrate into your app. You’ve already used the UIKit framework to design your app’s user interface, and the Foundation framework to incorporate common data structures and behavior into your code. These are two of the most common frameworks used in iOS app development, but there are many more available to you.
This chapter is a high-level overview of technologies and frameworks that you might consider adopting in your app. Use this chapter as a starting point for possible technologies to explore. For a full overview of the technologies available in iOS, see iOS Technology Overview.
UIKit. UIKit framework classes let you create a touch-based user interface. Because all iOS apps are based on UIKit, you can’t ship an app without this framework. UIKit provides the infrastructure for drawing to the screen, handling events, and creating common user interface elements. UIKit also organizes a complex app by managing the content that’s displayed onscreen. See UIKit Framework Reference.
Core Graphics. Core Graphics—a low-level, C-based framework—is the workhorse for handling high-quality vector graphics, path-based drawing, transformations, images, data management, and more. Of course, the simplest and most efficient way to create graphics in iOS is to use prerendered images with the standard views and controls of the UIKit framework, letting iOS do the drawing. Because UIKit, a higher-level framework, also provides classes for custom drawing—including paths, colors, patterns, gradients, images, text, and transformations—use it instead of Core Graphics whenever possible. SeeCore Graphics Framework Reference.
Core Animation. Core Animation interfaces are part of the Quartz Core framework. Use Core Animation to make advanced animations and visual effects. UIKit provides animations that are built on top of the Core Animation technology. If you need advanced animations beyond the capabilities of UIKit, use Core Animation directly. You can create a hierarchy of layer objects that you manipulate, rotate, scale, transform, and so forth. Core Animation’s familiar view-like abstraction lets you can create dynamic user interfaces without having to use low-level graphics APIs such as OpenGL ES. See Core Animation Programming Guide.
GameKit. The GameKit framework provides leaderboards, achievements, and other features to add to your iOS game. See GameKit Framework Reference.
SpriteKit. The SpriteKit framework provides graphics support for animating arbitrary textured images, orsprites. In addition to being a graphics engine, it also includes physics support to bring objects to life. SpriteKit is a good choice for games and other apps that require complex animation chains. (For other kinds of user interface animation, use Core Animation instead.) See SpriteKit Programming Guide.
OpenGL ES. OpenGL ES is a low-level framework that supports hardware-accelerated 2D and 3D drawing. Apple’s implementation of the OpenGL ES standard works closely with the device hardware to provide high frame rates for full-screen, game-style apps. Because OpenGL ES is a low-level, hardware-focused API, it has a steep learning curve and a significant effect on the overall design of your app. (For apps that require high-performance graphics for more specialized uses, consider SpriteKit or Core Animation.) See OpenGL ES Programming Guide for iOS.
Game Controller. The Game Controller framework makes it easy to find controllers connected to a Mac or iOS device. When a controller is discovered on your device, your game reads control inputs as part of its normal gameplay. These controllers provide new ways for players to control your game. Apple has designed specifications for hardware controllers to ensure that all controllers have consistent sets of control elements that both players and game designers can rely on. See Game Controller Framework Reference.
Core Data. The Core Data framework manages an app’s data model. Use it to create model objects, known as managed objects. You manage relationships between those objects and make changes to the data through the framework. Core Data takes advantage of the built-in SQLite technology to store and manage data efficiently. See Core Data Framework Reference.
Foundation. You worked with Foundation earlier in this guide. The Foundation framework defines a set of useful base classes. Among other things, this framework includes classes representing basic data types, such as strings and numbers, and collection classes for storing other objects. See Foundation Framework Reference.
AV Foundation. AV Foundation is one of several frameworks that you can use to play and create time-based audiovisual media. For example, use AV Foundation to examine, create, edit, or reencode media files. You can also use it to get input streams from devices and manipulate video during real-time capture and playback. See AV Foundation Framework Reference.