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 1. Working with Objects > Invoking the Selectors of an Object Dynamical...

recipe 1.9. Invoking the Selectors of an Object Dynamically

1.9.1. Problem

You want to be able to dynamically call any method in any object given the name of the method and its parameters.

1.9.2. Solution

Use the NSInvocation class, like so:


  

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