十一岁的加重songxing10000…… ------ 回到博主首页

MBProgressHUD+FastCall

  

+ (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];
           
 }];

 

posted @ 2015-11-28 17:35  songxing10000  阅读(189)  评论(0)    收藏  举报