//条件编译
//判断系统版本
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0
UIAlertController * alertC = [[UIAlertController alloc] init];
#else
UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"更新" message:@"有新版本的程序可以更新" delegate:self cancelButtonTitle:@"下次更新" otherButtonTitles:@"马上更新", nil];
[alertView show];
#endif
网友评论