码迷,mamicode.com
首页 > 其他好文 > 详细

UI弹框

时间:2015-05-26 09:16:25      阅读:196      评论:0      收藏:0      [点我收藏+]

标签: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弹框

标签:ui 弹框

原文地址:http://blog.csdn.net/a88410518/article/details/46002529

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!