【发布时间】:2011-02-19 03:35:41
【问题描述】:
我需要在应用程序的第 3 次、第 10 次和第 20 次发布时显示NSAlert,到目前为止我已经尝试过:
/* Note that the kLaunchCount is incremented as a Number in a dictionary */
if([[[NSUserDefaults standardUserDefaults] objectForKey:@"kLaunchCount"] intValue] == 1||2||3)
{
/* show the NSAlert */
}
上面的代码在每次启动时都会显示NSAlert。
【问题讨论】: