私はMBProgressHUDで遊んでいます。ビューコントローラ(テーブルビュー)のワーフローは次のようになります。
1)2つの異なるテーブルを切り替えるためにIBActionが呼び出されます2.1)関数reloadAllMonth
が呼び出されます(新しいテーブルのデータで配列を初期化します)2.2)MBProgressHUD * HUDが表示されます3)reloadAllMonthが終了します4)HUDが消えます
私の現在のコード:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
//sparing you the code that determins where the tap occured
HUD = [[MBProgressHUD alloc]initWithFrame:self.view.frame];
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
[self reloadAllMonth];
allMonthIsActive = YES;
[MBProgressHUD hideHUDForView:self.view animated:YES];
// some other code table reload etc.
}
何が起こるのですか:
->関数touchesbeganが呼び出されます->3〜4秒間何も起こりません(読み込み時間)->新しいテーブルがポップアップします
質問: HUDが表示されないのはなぜですか?どこで私は間違えましたか ?