我需要像在标准 iPod.app 中那样实现我的 UIViewController 子类的行为:当设备从纵向旋转到横向时,UIViewController 的内容保持静止并在其上方添加新视图。
问题是,当设置
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
内容正在旋转
但是当设置
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return NO;
}
功能
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {
NSLog(@"did rotate form interface orientation %d",fromInterfaceOrientation);
}
是较新的称为
那么,你知道如何在不旋转内容的情况下处理 UIViewController 内的设备旋转吗?