您的位置:首页 > 其它

MBProgressHUD+FastCall

2015-11-28 17:35 309 查看


  

+ (void)showHudTipStr:(NSString *)tipStr;

+ (void)showHudTipStr:(NSString *)tipStr{
if (tipStr && tipStr.length > 0) {
MBProgressHUD *hud = [self showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];
hud.mode = MBProgressHUDModeText;
hud.detailsLabelFont = [UIFont boldSystemFontOfSize:15.0];
hud.detailsLabelText = tipStr;
hud.margin = 10.f;
hud.removeFromSuperViewOnHide = YES;
[hud hide:YES afterDelay:1.0];
}
}


调用

[self.user updateInBackgroundWithResultBlock:^(BOOL isSuccessful, NSError *error) {

NSString *tip = isSuccessful?@"设置成功":error.userInfo[@"error"];

[MBProgressHUD showHudTipStr:tip];

}];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: