正如標題所示,我試圖解決在按鈕收到一定數量的水龍頭後如何顯示警報。到目前爲止,香港專業教育學院拿出如何在收到的水龍頭數量後顯示警報視圖
- (IBAction)count:(id)sender {
{
UITouch *touch = [count];
if (touch.tapCount == 4)
{
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title" message:@"My alert text here" delegate:nil cancelButtonTitle: @"Ok" otherButtonTitles: nil];
[alert show];
}
}
上述心不是工作,我已經建立了我的按鈕count
的行動和作爲出口counted
沒有不編譯只是顯示該ID至少有一個努力來解決它自己。感謝您的幫助,這很好!只需將NSUinteger'm_buttonTouchCount'更改爲'm_touchButtonCount',以供任何其他需要此代碼的人使用。 – JSA986