タイトルが示唆するように、ボタンが一定量のタップを受け取った後にアラートを表示する方法を見つけようとしています。これまでのところ、思いついた
- (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