MBProgressHUD 的方法可以用比较简便的加方法去实现
[MBProgressHUD showHUDAddedTo:self.view animated:TRUE];如果是用的alloc的话一定要注意addsubview,否则不会显示在view上面
self.hud = [[MBProgressHUD alloc]initWithView:self.view];
self.hud.labelText = @"Is Landing";
[self.view addSubview:self.hud];//重要再有一个需要注意的就是,有的时候线程很卡或会卡死,那么一定要设置一个超时时间例如
[self.hud show:YES];
[self.hud hide:YES afterDelay:30];------------------------------------2014.4.22----------------------------------------
如果当HUD不消失的时候,可以测试一下是否在主线程,如果不是在主线程的话,要在主线程刷新隐藏HUD
dispatch_async(dispatch_get_main_queue(), ^{
[self.HUD hide:YES];
});

2338

被折叠的 条评论
为什么被折叠?



