Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning iOS UI Development

You're reading from   Learning iOS UI Development Implement complex iOS user interfaces with ease using Swift

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785288197
Length 196 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Drawing on the graphic context

Thanks to the core graphics frameworks, you can access the Quartz 2D engine, an API based on interesting drawing tools such as path-based design, color management, transformations, masking, and color blending.

Note

Note that it is common to refer to core graphics and Quartz 2D interchangeably. To be precise, core graphics is the framework that contains Quartz 2D; all the functions of this API use CG as prefix. Quartz 2D is not to be confused with Quartz Core, though. The latter is in fact the framework that contains core animation and core image.

When it comes to using core graphics, the main rule of thumb is that if you want to perform any kind of drawing, you need to get access to a graphic context. The context becomes a sort of dashboard where all the drawing operations are executed.

The data type that represents a context is CGContextRef (or just CGContext), which is an opaque object that encapsulates all the information needed to draw, depending on the drawing...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime