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

+ (void)showHudTipStr:(NSString *)tipStr{
if (tipStr && tipStr.length > ) {
MBProgressHUD *hud = [self showHUDAddedTo:[UIApplication sharedApplication].keyWindow animated:YES];
hud.mode = MBProgressHUDModeText;
hud.detailsLabelFont = [UIFont boldSystemFontOfSize:15.0];
hud.detailsLabelText = tipStr;
hud.margin = .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的更多相关文章

  1. MBProgressHud添加自定义动画

    在使用自定义view时,若直接使用,如下 MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; hud ...

  2. IOS MBProgressHUD的使用

    一,简介         苹果的应用程序一般都会用一种优雅的,半透明的进度显示效果,不过这个API是不公开的,因此你要是用了,很可能被清除出AppStore.而 MBProgressHUD提供了一个替 ...

  3. iOS基于MBProgressHUD的二次封装,一行搞定,使用超简单

    MBProgressHUD的使用,临时总结了几款最常用的使用场景: 1.提示消息 用法: [YJProgressHUD showMessage:@"显示文字,1s隐藏" inVie ...

  4. MBProgressHUD上传照片进度提示

    第一步,控制器先来个属性 @property (strong, nonatomic) MBProgressHUD *HUD; 第二步,显示与隐藏的调用方法 - (void)hudTipWillShow ...

  5. MBProgressHUD框架的使用:https://github.com/jdg/MBProgressHUD

    MBProgressHUD是一个开源类库,实现了各种样式的提示框, 下载地址:https://github.com/jdg/MBProgressHUD,然后把两个MBProgressHUD.h和MBP ...

  6. Linux内核中的fastcall和asmlinkage宏

    代码中看见:#define _fastcall 所以了解下fastcall -------------------------------------------------------------- ...

  7. MBProgressHUD使用

    //方式1.直接在View上show HUD = [[MBProgressHUD showHUDAddedTo:self.view animated:YES] retain]; HUD.delegat ...

  8. MBProgressHUD.h file not found

    MBProgressHUD框架,怎么我导入MBProgressHUD+MJ.h会报错.(即MBProgressHUD+MJ根本不存在),我看其他人的视屏又可以导入 MBProgressHUD.h fi ...

  9. 【转】IOS学习笔记29—提示框第三方库之MBProgressHUD

    原文网址:http://blog.csdn.net/ryantang03/article/details/7877120 MBProgressHUD是一个开源项目,实现了很多种样式的提示框,使用上简单 ...

随机推荐

  1. 【CodeVS 1198】【NOIP 2012】国王游戏

    http://codevs.cn/problem/1198/ 推导一翻,排好序后,直接上高精度. #include<cstdio> #include<cstring> #inc ...

  2. java中map<string,int>

    java中 Iterator it=wordsmap.entrySet().iterator(); while(it.hasNext()) { Map.Entry<String,Integer& ...

  3. Jquery.min.js 下载

    Jquery 下载:http://www.jq22.com/jquery-info122

  4. 【转】eclipse导入V7包出现错误解决办法

    android下v4    v7   v21等包是android系统的扩展支持包,就想windows的系统补丁一个道理. android的扩展包主要是用来兼容低版本的,比如android3.0以后出现 ...

  5. 【LintCode】计算两个数的交集(二)

    问题分析: 用两个指针分别遍历即可. 问题求解: public class Solution { /** * @param nums1 an integer array * @param nums2 ...

  6. python 内建类型

    ''' 数值 numbers 字符串 strings 列表 lists 字典 dictionaries 元组 tuples 文件 files 集合 sets ''' 1.1 序列的操作 所有序列类型都 ...

  7. IOS URL 编码和解码

    1.url编码 ios中http请求遇到汉字的时候,需要转化成UTF-8,用到的方法是: NSString * encodingString = [urlString stringByAddingPe ...

  8. Java数组操作利器:Arrays工具类

    java.util.Arrays提供大量的工具方法来操作数组,这些方法全是静态方法. 1 便捷创建List public static <T> List<T> asList(T ...

  9. 【caffe】未定义函数或变量caffe_

    @tag: caffe windows10上配置好caffe后(配置了matlab接口),运行caffe-master/matlab/demo/classification_demo.m报错,提示: ...

  10. 【BZOJ-3709】Bohater 贪心

    3709: [PA2014]Bohater Time Limit: 5 Sec  Memory Limit: 128 MBSec  Special JudgeSubmit: 835  Solved:  ...