首页 > 其他 > 详细

MBProgressHUD+FastCall

时间:2015-11-28 18:07:55      阅读:436      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!