views:

58

answers:

2

See topic. It's just with one application -- 2 of them work fine, but the third (and largest, go figure) doesn't respond to touch events. I tried changing a UIImageView's location on TouchesBegan, and that doesn't show up (but it does in the Simulator!)

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{



UITouch *touch = [touches anyObject];
gestureStartPoint = [touch locationInView:self.view];
mothership.center = CGPointMake(80,80);
//etc...

I've tried both debug and release modes. Any idea on what would cause this? The rest of the game runs fine (enemy ships appear and shoot at you, so I know the rest of the code is working). Any advice is much appreciated. Thank you!

A: 

Don't respond to touches in the individual views. This can be problematic. Instead use the backing view to handle all touches. A good sample of this technique is in the Apple Sample Code: Touches

(requires dev login)

Corey Floyd
Thanks, that code was helpful.
A: 

Weirdly enough, updating my ipod to 3.0 did the trick!