自消alertView

#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();

    }

}


阅读更多
上一篇可自己消失的alterView
下一篇网络监测
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭