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];

}];

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容