views:

59

answers:

0

Hi guys!

I got three views.

UIView *view1; UIView *view2; UIView *view3;

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

UITouch *touch =[touches anyObject]; CGPoint startPoint =[touch locationInView:self.view];

}

But i want that the toch-action only go in view2. It doesnt work if i make: locationInView:view2

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

UITouch *touch =[touches anyObject]; CGPoint startPoint =[touch locationInView:view2];

}

What do I wrong? How can i check, which view is the view i actually can see on my iphone?

Please help me! Thank you!

Greez Franhu