ios MBProgressHUD的使用方式,需要导入MBProgressHUD框架
1、生命定义 @property (nonatomic, strong) MBProgressHUD *progressBox; 2、初始化,此为视图居中显示 self.progressBox = [[MBProgressHUD alloc] initWithView:self.view]; [progressBox setYOffset:-50]; [self.view addSubview:progressBox]; 3、开始旋转,例如你正在请求时 [self.progressBox setLabelText:@"login_loading"]; [self.progressBox show:YES]; 4、停止旋转 [self.progressBox hide:YES];