【发布时间】:2016-11-12 09:35:46
【问题描述】:
我有一个问题。
我在 tableviewcontroller 中使用 MBProgressHUD。
我希望 MBProgressHUD 加载动画然后用户不能触摸任何东西并等待服务器数据显示在 tableview 上。
我想暂停屏幕直到 hud hideAnimated。
谢谢!
这是我的代码:
MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.listTableView animated:YES];
hud.label.text = @"Loading";
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 0.01 * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self getInfo:nil];
});
hud.userInteractionEnabled = YES;
[hud hideAnimated:YES afterDelay:2];
【问题讨论】:
-
你有请求的回调吗?你应该在那里做
[hud hideAnimated:YES]。 -
你想在哪里暂停???
标签: ios iphone uitableview mbprogresshud