标签:ui 弹框
1. ios7弹框
// ios7弹框的创建
// 弹框的创建
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"欢迎" message: @"欢迎来到德莱联盟" delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:nil, nil];
// 显示弹框
[alert show];
2。ios8弹框
// ios8弹框
// 创建弹框
[super viewDidAppear:(BOOL)animated];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"中奖" message:@"恭喜你中奖了" preferredStyle:UIAlertControllerStyleAlert];
// 添加弹框的取消按钮
UIAlertAction *action = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:action];
// 显示弹框
[self presentViewController:alert animated:NO completion:nil];}
标签:ui 弹框
原文地址:http://blog.csdn.net/a88410518/article/details/46002529