关闭

可自己消失的alterView

150人阅读 评论(0) 收藏 举报
分类:

#pragma mark - 自消alertView

- (void)showDissmissSelfAlertViewTitle:(NSString *)aTitle message:(NSString *)aMessage complete:(void (^)(void))complete

{

    doneBlock = complete;

    if (aTitle == nil) {

        aTitle = @"";

    }

    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:aTitle message:aMessage delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];

    [alertView show];

    [self performSelector:@selector(dimissAlertView:) withObject:alertView afterDelay:3.0f];

}

- (void)dimissAlertView:(UIAlertView *)alertView

{

    [alertView dismissWithClickedButtonIndex:0 animated:YES];

    if (doneBlock) {

        doneBlock();

    }

}


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:27975次
    • 积分:948
    • 等级:
    • 排名:千里之外
    • 原创:62篇
    • 转载:53篇
    • 译文:0篇
    • 评论:0条