看板 MacDev 關於我們 聯絡資訊
目前警告視窗出現的次數是用這個方法 if (StartGame.hidden==YES) { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Moving Stopped" message:@"Finger has been lifted off the screen." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles: nil]; [alert show]; } 有辦法可以算出目前警告視窗出現了幾次嗎? 還是有辦法計算button按過的次數呢? 謝謝各位大大 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.114.54.99 ※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1425393143.A.D9E.html
Esvent: 設個變數 每次執行到這邊就++一次? 03/03 22:48
kidd0717: 或是alertview有delegate 在那邊去計算按鈕按了幾次也可 03/03 23:58
BS0824: static會是你的好選擇 03/04 08:43