Question

i have a detailview where content is displayed. with a button i am presenting another view modally:

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

So, when i dismiss this helpViewController, the detailview is always in portraitMode.
Cant get it to the correct device orientation.

I have tried it with this to rotate it to device orientation:

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

    [UIViewController attemptRotationToDeviceOrientation];
}  

It seems that after dismissing the helpViewController viewDidAppear is not called in detailView.
So how can i get that to work?

Was it helpful?

Solution

Plz try to set the detailview.m as

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

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top