正如标题所暗示的那样,我试图弄清楚如何在按钮获得一定数量的点击后显示警报。到目前为止,我想出了
- (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