【代码笔记】iOS-MBProgressHUD-Demo_移动开发_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > 移动开发 > 【代码笔记】iOS-MBProgressHUD-Demo

【代码笔记】iOS-MBProgressHUD-Demo

 2017/12/7 10:36:30  陈沐夕  程序员俱乐部  我要评论(0)
  • 摘要:一,工程图。二,代码。ViewController.m#import"ViewController.h"#import"MBProgressHUD.h"@interfaceViewController()@end@implementationViewController-(void)viewDidLoad{[superviewDidLoad];//Doanyadditionalsetupafterloadingtheview,typicallyfromanib
  • 标签:笔记 iOS 代码 SSH

一,工程图。

二,代码。

ViewController.m

class="cnblogs_code_copy" style="font-size: 18px">复制代码
#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
复制代码
发表评论
用户名: 匿名