作者ljuyentintho (小刘)
看板MacDev
标题[问题]可计算视窗出现的次数或按钮按过的次数吗
时间Tue Mar 3 22:32:21 2015
目前警告视窗出现的次数是用这个方法
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://webptt.com/cn.aspx?n=bbs/MacDev/M.1425393143.A.D9E.html
1F:→ Esvent: 设个变数 每次执行到这边就++一次? 03/03 22:48
2F:→ kidd0717: 或是alertview有delegate 在那边去计算按钮按了几次也可 03/03 23:58
3F:→ BS0824: static会是你的好选择 03/04 08:43