【发布时间】:2010-11-06 09:35:51
【问题描述】:
我需要像在标准 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 中处理设备旋转而不旋转它的内容吗?
【问题讨论】:
标签: iphone cocoa-touch iphone-sdk-3.0 uiviewcontroller