我有一個導航欄的UIViewTable。當我讀取數據時,我在表格頂部顯示帶有ActivityIndicator的UIViewController。問題是當我旋轉設備這個頂視圖不旋轉時,我不知道爲什麼? :( 這是我添加頂視圖與ActivityIndicator:關鍵窗口不旋轉
UIView *view = [[UIApplication sharedApplication] keyWindow];
[view addSubview:viewWithLoader.view];
這是我的移除:
[viewWithLoader.view removeFromSuperview];
這是從俯視圖(與ActivityIndicator)方法:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
你有沒有其他的子視圖那些旋轉? – Pacu 2011-03-17 14:09:46
是的一切正常。在我將它添加爲'keyWindow'之前,這個工作正常。但我必須這樣做,因爲如果我只說[self.view addsubview:viewWithLoader] ...那麼我不會在導航欄上。 – 1110 2011-03-17 14:24:33