Book Image

Learning iOS UI Development

Book Image

Learning iOS UI Development

Overview of this book

Through this comprehensive one-stop guide, you’ll get to grips with the entire UIKit framework and in a flash, you’ll be creating modern user interfaces for your iOS devices using Swift. Starting with an overview of the iOS drawing system and the available tools, you will then learn how to use these technologies to create adaptable layouts and custom elements for your applications. Next, you’ll be introduced to other topics such as animation and code-drawing with Core Graphics, which will give you all the knowledge you need to create astonishing user interfaces. By the end of this book, you will have a solid foundation in iOS user interface development and will have gained valuable insights on the process of building firm and complex UIs.
Table of Contents (16 chapters)
Learning iOS UI Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 9. Introduction to Core Graphics

In the previous chapters, we focused on high-level technologies such as UIKit; then, we moved a step below these to talk about core animation. In this chapter, we will dig even deeper down the system architecture layer and finally reach core graphics, a framework that gives you a multitude of instruments to fully handle 2D drawing on different contexts, such as views, PDF, and bitmap, thanks to the Quartz 2D engine.

All this awesomeness comes at a cost: the effort needed to achieve complex designs is obviously much higher than when you're just using UIKit or core animation. On the bright side, you gain control over powerful tools that grant access to all the freedom you need to create 2D designs programmatically.

Through this chapter, we will talk mainly about these topics:

  • The graphic context and graphic state

  • UIKitCore graphics helpers

  • Drawing with paths