ios提示框的变化

//iOS9之前的  说明已经收藏过了

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"已经收藏啦" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"确定", nil];

[alert show];

//ios9之后的提示框

UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"" message:@"" preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"" style:UIAlertActionStyleCancel handler:nil];

[alertController addAction:action1];

[self presentViewController:alertController animated:YES completion:nil];

你可能感兴趣的:(ios提示框的变化)