Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ethana

macrumors 6502a
Original poster
Jul 17, 2008
836
0
Seattle, WA
Ok, I am having a bit of a problem. I have an app that has a Main view and a Flipside View. You can get to the Flipside by pressing the little i in the lower right corner.

Well, my app also has the ability to have the screen touched anywhere and have a number auto-increment when it's touched. The problem is that because the touch can be anywhere it's overtaking the i touch and people can't get to the Flipside view.

Any ideas on how to stop this from happening? How do I make the touch happen anywhere on the screen except the lower right corner?

Here's my code:
Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
        // Everything that happens here occurs when touches happen     
        // anywhere on the screen. Unfortunately it blocks the i touch as well.
	number = number  + 1; 
	label.text = [NSString stringWithFormat: @"%d", number];
	if (number == 5)
	{
		imageHello.hidden = NO;
	}
}
 
As long as the 'i' is a UIButton (which im assuming it is), it's UIView superclass provides a property called exclusiveTouch which is NO by default, so setting that to YES should do what you need.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.