我正在制作一个带有表格视图的应用程序。我想使用 MBProgressHUD 实现一个加载屏幕,以便在从 Internet 读取数据之前显示它。但是,未使用以下代码显示数据:
- (void)viewDidLoad
{
HUD = [[MBProgressHUDalloc] initWithView:self.view];
[self.viewaddSubview:HUD];
HUD.delegate = self;
[HUD showWhileExecuting:@selector(load_data) onTarget:self withObject:nil animated:YES];
}
数据可以单独使用函数 load_data 显示在 tableview 中(即 [self load_data],但不能使用 HUD。