首页 > 其他 > 详细

UI弹框

时间:2015-05-26 09:14:38      阅读:180      评论:0      收藏:0      [点我收藏+]

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!