![]() ![]() The basic drawing model for subclasses of the UIView class involves updating content on demand. When you draw in an offscreen context, you are not drawing in a view, which means that concepts such as the view drawing cycle do not apply (unless you then obtain that image and draw it in an image view or similar). In addition to drawing directly to the screen, UIKit also allows you to draw into offscreen bitmap and PDF graphics contexts. If you use Quartz, Core Animation, and UIKit to draw, you use the drawing concepts described in the following sections. If you define custom views, however, you must provide the drawing code yourself. If you use system-provided views, this drawing is handled for you automatically. Views define the portion of the screen in which drawing occurs. ![]() In iOS, all drawing to the screen-regardless of whether it involves OpenGL, Quartz, UIKit, or Core Animation-occurs within the confines of an instance of the UIView class or a subclass thereof. Be sure to check the documentation before performing drawing-related operations on threads other than your app’s main thread. Important: Not all UIKit classes are thread safe. You will also find tips and guidance on how to optimize your drawing code for the iOS platform. This chapter provides an overview of the drawing process for iOS apps, along with specific drawing techniques for each of the supported drawing technologies. Core Animation provides the underlying support for animating changes in many UIKit view properties and can also be used to implement custom animations. UIKit provides Objective-C wrappers for line art, Quartz images, and color manipulations. Quartz is the main drawing interface, providing support for path-based drawing, anti-aliased rendering, gradient fill patterns, images, colors, coordinate-space transformations, and PDF document creation, display, and parsing. (To learn about OpenGL drawing, see OpenGL ES Programming Guide.) This document describes native rendering. iOS provides two primary paths for creating high-quality graphics in your system: OpenGL or native rendering using Quartz, Core Animation, and UIKit. Providing high-quality graphics not only makes your app look good, but it also makes your app look like a natural extension to the rest of the system. High-quality graphics are an important part of your app’s user interface. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |