I have written a subclass of UIControl that tracks a number of gestures that are of interest to me. In the documentation for the UIControlEvents enumeration, it says that there is a range of event numbers called UIControlEventApplicationReserved that is "available for application use." Does this mean that I am free to use this range of numbers for my own custom events?
If so, can someone please tell me how to fire events? The obvious way I can think of to do it is this:
enum {
...
MyCustomEvent = 65,
...
};
...
UIEvent* customEvent;
...
for (id target in [self allTargets])
{
for (NSString* action in [self actionsForTarget:target forControlEvent:MyCustomEvent])
{
[self sendAction:NSSelectorFromString(action) to:target forEvent:customEvent];
}
}
Would that even work?