码迷,mamicode.com
首页 > 其他好文 > 详细

MBProgressHUD+FastCall

时间:2015-11-28 18:09:29      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:

技术分享

  

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

 

MBProgressHUD+FastCall

标签:

原文地址:http://www.cnblogs.com/songxing10000/p/5003039.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!