我有一个导航栏的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