views:

38

answers:

2

hi,

imagine i have a UIView and to that i add 2 UIButton's

i find that i can put a finger on one button, then, holding the first, i can touch the 2nd button with another finger. Both buttons will show their UIControlStateHighlighted images.

Is there a way to stop the 2nd touch working? I thought that multipleTouchEnabled = NO was the answer, but seems not!

any ideas?

thanks tony

A: 
-(IBAction)button1Pressed {
    button2.enabled = NO;
}
-(IBAction)button2Pressed {
    button1.enabled = NO;
}

For touch down.

Then for touch up inside and touch up outside.

-(IBAction)button1Lifted {
    button2.enabled = YES;
}
-(IBAction)button1Lifted {
    button2.enabled = YES;
}
thyrgle
A: 

when you tab on 1st button, in Button's IBAction method,make a user interaction of a 2nd button disabled.(On 1st line) and in last line of 1st button IBAction code, make 2nd button user interaction enabled.(on last line). set IBAction to touchDown.

& vice-versa.

Matrix