Problem with touches and flipside view

Discussion in 'iPhone/iPad Programming' started by ethana, Aug 3, 2008.

  1. macrumors 6502a

    Joined:
    Jul 17, 2008
    Location:
    Seattle, WA
    #1
    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;
    	}
    }
    
     
  2. macrumors newbie

    Joined:
    Feb 5, 2008
    #2
    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.
     

Share This Page