当前位置: 首页 > 工具软件 > MBProgressHUD > 使用案例 >

MBProgressHUD

扈瑞
2023-12-01

//===========***Delegate***============//

#pragma mark - MBProgressHUDDelegate

-(void)showSuccessMessage:(NSString *)msg

{

    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];

    hud.userInteractionEnabled = NO;

    // Configure for text only and offset down

    hud.mode = MBProgressHUDModeText;

    hud.labelText = msg;

    hud.margin = 10.f;

    hud.removeFromSuperViewOnHide = YES;

    [hud hide:YES afterDelay:2];

}


-(void)showLoadView

{

    HUD = [[MBProgressHUD alloc]init];

    [self.view addSubview:HUD];

    HUD.delegate = self;

    [HUD show:YES];

}


-(void)showDismissLoadView

{

    [HUD hide:YES];

}


-(void)hudViewWasTapped {

    [HUD hide:YES];

    if (HUD != nil) {

        [HUD removeFromSuperview];

        HUD = nil;

    }

}


 类似资料:

相关阅读

相关文章

相关问答