0
我有一些代碼來處理一個大尺寸的文件,這將需要很長時間。 我希望進步啓動時顯示與UIActivityIndicatorView景色和隱藏的觀點,當它完成用UIActivityIndicatorView顯示UIView需要很長時間才能做點什麼
的代碼如下
[[NSNotificationCenter defaultCenter] postNotificationName:@"DisplayProcessing" object:nil];
[self dosomething];//take a long time
[[NSNotificationCenter defaultCenter] postNotificationName:@"HideProcessing" object:nil];
但其excution順序是:
[[NSNotificationCenter defaultCenter] postNotificationName:@"DisplayProcessing" object:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:@"HideProcessing" object:nil];
[self dosomething];//take a long time
所以有沒什麼顯示
歡迎任何評論