On Dec 18, 2009, at 7:32 AM, glenn andreas wrote:

> 2) Subclass UIApplication and override sendEvent: - this can get ugly from an 
> architecture point of view (since you no longer have a nice little reusable 
> view - you've got to do major surgery on the application itself), and 
> sendEvent: does a whole lot of work that you'll want to be careful not to 
> break.


The general recommendation is to subclass UIWindow instead of UIApplication. 
Still override -sendEvent:, but realize that the event has already been given 
its destiny, you only get to peek at it and possibly embellish, and you should 
send it on its way ([super sendEvent:]) before you do anything else.

And whatever else you do, make sure your quick with it, because -sendEvent: 
gets called a LOT.
--
David Duncan
Apple DTS Animation and Printing

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to