MBProgressHUD

1. 进度条加载 动画 (一个扇形的进度条)

MBProgressHUD *hud = [[MBProgressHUD alloc] init];

[[[UIApplication sharedApplication].windows firstObject] addSubview:hud];

//加载条上显示文本

hud.labelText = @"急速清理中";

//置当前的view为灰度

hud.dimBackground = YES;

//设置对话框�样式

hud.mode = MBProgressHUDModeDeterminate;

[hud showAnimated:YES whileExecutingBlock:^{

while (hud.progress < 1.0) {

hud.progress += 0.01;

[NSThread sleepForTimeInterval:0.02];

}

hud.labelText = @"清理完成";

} completionBlock:^{

[[SDImageCache sharedImageCache] clearDisk];

[[SDImageCache sharedImageCache] clearMemory];

block_self.clearCacheName = @"0.0KB";

block_self.arrays = nil;

[block_self setupGroup0];

[block_self setupGroup2];

[block_self.tableview reloadData];

[hud removeFromSuperview];

}];

你可能感兴趣的:(MBProgressHUD)