我有一个详细介绍,其中显示内容。使用一个按钮,我正在模次呈现另一个视图:

[self.viewController presentModalViewController:helpViewController animated:NO];  
.

所以,当我解雇此帮助welpViewController时,DetailView始终处于vaightMode。
无法使其到正确的设备方向。

我已经尝试过它以将其旋转到设备方向:

if ([UIViewController respondsToSelector:@selector(  
    attemptRotationToDeviceOrientation)]) {

    [UIViewController attemptRotationToDeviceOrientation];
}  
.

似乎在解除HelpViewController后,ViewDideapper在DetailView中未调用。
所以我如何获得它来工作?

有帮助吗?

解决方案

plz尝试将DetailView.m设置为

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 
{
// Return YES for supported orientations
return YES;
//    return (interfaceOrientation == UIInterfaceOrientationPortrait);

}
.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top