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

Chapter 17. Objective-C Design Patterns > Describing Design Patterns in Objecti...

17.2. Describing Design Patterns in Objective-C

Most design pattern books follow a specific format in the description of their patterns. Typically, these books begin by stating a particular type of problem. They then follow the problem statement with a description of the solution, including code for the solution, and then finally a discussion about the solution. For the purposes of the design patterns I am going to discuss here I intend to follow this pattern.

17.2.1. Using Singletons

17.2.1.1. Problem

You need to ensure that there is one and only one instance of a particular class in your application and provide a global point of access to it. This may be due to design constraints or for the purposes of controlling access to a finite resource.


  

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