【发布时间】:2010-07-02 19:32:34
【问题描述】:
我有一个 UINavigationController (Parent) 正在推送 UIViewController (Child)。我知道两者都需要支持:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return YES; //(interfaceOrientation == UIInterfaceOrientationPortrait);
}
但是,我不希望父级能够旋转到横向。我该如何执行?
更新:
我的父母已更新为:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if (interfaceOrientation != UIInterfaceOrientationLandscapeRight ||interfaceOrientation != UIInterfaceOrientationLandscapeLeft )
return NO;
else
return YES;
}
但现在孩子没有旋转。
【问题讨论】:
标签: iphone objective-c cocoa-touch uinavigationcontroller rotation