Information Technology Reference
In-Depth Information
FIGURE 8.3
OS X supports many more First Responder actions than iOS.
CAUTION
Some very important events don't appear in IB. For example, iOS and OS X touch messages— touchesBegan: ,
among others—aren't listed anywhere in IB. They're hardwired into the responder chain, and you can't redirect
them in IB. You can only respond to them with code. If you want to copy and redirect them to multiple objects,
you must add code to implement this.
Subclassing Views and Other Objects
A key feature of object-oriented development is subclassing —the ability to copy an existing object and extend
it with custom code and new features. IB supports subclassing, but the steps required to replace a standard Co-
coa/Cocoa Touch class object with a subclassed version of the same object aren't immediately obvious.
To subclass an object, follow these steps:
1. Add a new subclass to the project in the main Xcode editor, and add custom code to implement new fea-
tures.
2. Assign the subclass to an existing object in IB.
 
Search WWH ::




Custom Search