I'm trying to implement touches in my Layer and my app is crashing every time I tap the screen. I'm running 0.8.1, using Fast Director, touches are enabled on the layer. When the app crashes, it doesn't leave any info about the crash in the gdb console. I haven't run it through Instruments yet to get the stack trace, but I thought someone here might know why it's not working. Here's the code for ccTouchesBegan:
- (BOOL)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView: [touch view]];
location = [[Director sharedDirector] convertCoordinate: location];
NSLog(@"touch registered at %@", location);
return kEventHandled;
}
Pretty simple, I'm just trying to get down to basics and record a touch point. Am I being stupid and missing something easy? This seems to be identical to the code that works for other members of this board.