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

URBAlerViewDemo

时间:2014-10-27 12:25:20      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   os   ar   sp   文件   

 

效果图:

bubuko.com,布布扣

工程图:

bubuko.com,布布扣

注意:此文件要加入第三主库URBAlertView.

RootViewController.m

//点击任何处,出现提示框
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
    
    URBAlertView *alertView = [URBAlertView dialogWithTitle:@"Test Dialog" subtitle:@"This is just a test dialog"];
    alertView.blurBackground = NO;
    [alertView addButtonWithTitle:@"Close"];
    [alertView addButtonWithTitle:@"OK"];
    [alertView setHandlerBlock:^(NSInteger buttonIndex, URBAlertView *alertView) {
        NSLog(@"button tapped: index=%i", buttonIndex);
        [alertView hideWithCompletionBlock:^{
        }];
    }];
    
    self.alertView = alertView;
    [self showDialogWithTumble];

}
- (void)showDialog {
    [self.alertView showWithAnimation:URBAlertAnimationDefault];
}

- (void)showDialogWithFade {
    [self.alertView showWithAnimation:URBAlertAnimationFade];
}

- (void)showDialogWithFlipHorizontal {
    [self.alertView showWithAnimation:URBAlertAnimationFlipHorizontal];
}

- (void)showDialogWithFlipVertical {
    [self.alertView showWithAnimation:URBAlertAnimationFlipVertical];
}

- (void)showDialogWithTumble {
    [self.alertView showWithAnimation:URBAlertAnimationTumble];
}

- (void)showDialogWithSlide {
    [self.alertView showWithAnimation:URBAlertAnimationSlideLeft];
}

 

源代码地址:http://url.cn/Ua2ztY

URBAlerViewDemo

标签:style   blog   http   color   io   os   ar   sp   文件   

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

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