iOS--使用第三方控件MBprogressionHUB创建提示框

//弹出提示
-(void)showHUD{
    
    self.HUD = [[MBProgressHUD alloc]initWithView:self.view];
    
    [self.view addSubview:self.HUD];
    self.HUD.mode = MBProgressHUDModeIndeterminate;
    
    self.HUD.yOffset = 70.0f;
    self.HUD.xOffset = 0.0f;
    
    [self.HUD showAnimated:YES whileExecutingBlock:^{
        sleep(3);
    } completionBlock:^{
        [self.HUD removeFromSuperview];
        self.HUD = nil;
    }];
    
    
}

 头文件引入:

@property(strong,nonatomic) MBProgressHUD* HUD;

使用时直接调用就可以了
.

posted on 2017-01-11 15:12  麦芽呀~  阅读(136)  评论(0编辑  收藏  举报