0
您好,我找到foruns對我檢測2個水龍頭我用這個代碼:
- (void) touchesBegan:(NSSet *) touches withEvent:(UIEvent *) event
{
UITouch *touch = [touches anyObject];
if (touch.tapCount == 2)
{
nosi=nosi-1;
if (nosi<10) {
nos.text = [NSString stringWithFormat:@"0%i", nosi];
} else {
nos.text = [NSString stringWithFormat:@"%i", nosi];
}
}
}
但是,如何檢測按鈕中的2個按鈕?