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
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Hour 8. Drawing User-Interface Elements > Drawing Your Own Button

Drawing Your Own Button

The SBGButton example source code shows to implement a button class from scatch: It draws the button and responds to user interaction itself. This section discusses the key methods.

Because the SBGButton class is a new class derived from UIView, Interface Builder knows nothing about it. Therefore, the example is built using the NIB-less version of the calculator. The applicationDidFinishLaunching method is responsible for adding SBGButtons to the calculator user interface.


  

You are currently reading a PREVIEW of this book.

                                                                                        

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

  

Start a Free Trial


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