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 11. Key-Value Coding and NSPredi... > Filtering and matching with predicat...

11.3. Filtering and matching with predicates

Now that you know how to reference and access object properties via string-based key paths, it may not surprise you that a layer of other technologies is built on top of this foundation.

Often, when provided with an object, you’ll want to compare it against a certain condition and perform different actions based on the result of the comparison. Similarly, if you have a collection of data, such as an NSArray or NSSet, you may want to use a specific set of criteria to filter, or select, subsets of the data.


  

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