View Full Version : Problem with touches and flipside view

Aug 3, 2008, 03:56 PM
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:

- (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;

Aug 6, 2008, 03:15 AM
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.