MBProgressHUD基础用法

MBProgressHUD版本号:0.9.2
以前用MBProgressHUD用得挺好的,基本上

- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(void (^)())completion ;

这套方法上去就没事了,但是现在不行了,老是提示要用GCD

'showAnimated:whileExecutingBlock:completionBlock:' is deprecated: Use GCD directly.

没办法,只能去网上下载了:https://github.com/jdg/MBProgressHUD
看了一下Demo,还真改了,上代码吧。

#import "ViewController.h"
#import "MBProgressHUD.h"

#define iOS7 [[[UIDevice currentDevice] systemVersion] floatValue]>=7.0
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self createView]; //创建各种HUD效果的点击按钮
}

//创建各种HUD效果的点击按钮
- (void)createView{

    
    NSArray *HudTypeArray =[NSArray arrayWithObjects:@"菊花怪",@"圆饼图",@"进度条",@"圆环",@"文字",@"自定义",nil];
    for (int i=0; i

你可能感兴趣的:(MBProgressHUD基础用法)