Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Drawing Custom Views

5. Drawing Custom Views

In this chapter, we will build a simple line graph that shows how the user’s weight changes over time. Both the weight axis and the time axis will scale to fill all available space. We will also draw labeled reference lines to help the user interpret the graph.

Most of this chapter focuses on performing custom drawing within our UIViews. We will look both at UIKit’s drawing methods and at the underlying Core Graphics framework. We will also examine how the iOS SDK manages the difference in resolution between regular and Retina displays.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint