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

AMSmoothAlertDemo

时间:2014-10-27 10:45:46      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   ar   for   sp   div   

效果图:

bubuko.com,布布扣

工程图:

bubuko.com,布布扣

此工程需要导入第三方,AMSmoothAlert

RootViewController.m

 

//点击任何处,出现提示框
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    alert = [[AMSmoothAlertView alloc]initDropAlertWithTitle:@"Congrats !" andText:@"You‘ve just displayed this awesome alert view !" andCancelButton:NO forAlertType:AlertSuccess];
    [alert.defaultButton setTitle:@"Great" forState:UIControlStateNormal];
    alert.completionBlock = ^void (AMSmoothAlertView *alertObj, UIButton *button) {
        if(button == alertObj.defaultButton) {
            NSLog(@"Default");
        } else {
            NSLog(@"Others");
        }
    };
    alert.cornerRadius = 3.0f;
    [alert show];

}

 

源代码地址:

http://url.cn/PSPoIv

AMSmoothAlertDemo

标签:style   blog   http   color   io   ar   for   sp   div   

原文地址:http://www.cnblogs.com/yang-guang-girl/p/4053590.html

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