今天使用HUD在tableview的代理方法didSelectRowAtIndexPath中使用HUD不能立即顯示
問題原因
UIKit 不能在當前run loop結束前重畫,即需要在下一個run loop 週期才能重畫,更新UI。
解決方案
手動運行NSRunLoop
即:
// Setup and show HUD here
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate distantPast]];
// Insert your code here
// Hide the shown HUD here