UIAlertView首先不推荐使用IOS 9
我尝试了几种使用UIAlertController而不是UIAlertView的方法。我尝试了几种方法,但无法使警报措施起作用。这是我的代码,可以在IOS 8和IOS 9中正常工作,但是显示不推荐使用的标志。我在下面尝试了优雅的建议,但在这种情况下无法使其起作用。我需要提交我的应用程序,这是最后要解决的问题。感谢您提出任何其他建议。我是新手。 #pragma mark - BUTTONS ================================ - (IBAction)showModesAction:(id)sender { NSLog(@"iapMade: %d", iapMade3); // IAP MADE ! =========================================== if (!iapMade3) { //start game here gamePlaysCount++; [[NSUserDefaults standardUserDefaults]setInteger:gamePlaysCount forKey:@"gamePlaysCount"]; NSLog(@"playsCount: %ld", (long)gamePlaysCount); if (gamePlaysCount >= 4) { UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Basic" message: THREE_PLAYS_LIMIT_MESSAGE delegate:self cancelButtonTitle:@"Yes, please" otherButtonTitles:@"No, thanks", nil]; …