1、下载,倒入该框架
2、加入代码
MBProgressHUD *HUD;
HUD = [[MBProgressHUD alloc] initWithWindow:[UIApplication sharedApplication].keyWindow];
// Add HUD to screen
[self.tableView addSubview:HUD];
// Regisete for HUD callbacks so we can remove it from the window at the right time
HUD.delegate = self;
HUD.labelText = @"加载中...";
// Show the HUD while the provided method executes in a new thread
[HUD showWhileExecuting:@selector(myTask) onTarget:self withObject:nil animated:YES];