您的位置:首页 > 移动开发 > IOS开发

【代码笔记】iOS-MBProgressHUD-Demo

2017-12-07 08:59 357 查看
一,工程图。



二,代码。

ViewController.m

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

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.

//初始化MBProgressHUD
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
hud.mode = MBProgressHUDModeCustomView;
hud.labelText = @"加载中";

}
//点击任何处隐藏MBProgressHUD
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[MBProgressHUD hideHUDForView:self.view animated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: