how to rotate to current of Orientation?

Posted by RAGOpoR on Stack Overflow See other posts from Stack Overflow or by RAGOpoR
Published on 2010-03-12T05:53:46Z Indexed on 2010/03/12 5:57 UTC
Read the original article Hit count: 194

Filed under:

according to my code when my device are use in Landscape

when i pushViewController it will

automatic show in UIDeviceOrientationPortrait.

i need to rotate my device to Portrait and then rotate to Landscape,

then it will present in Landscape mode.

how can i rotate to current of Orientation with out use of private API(setOrientation)?

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{
    return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIDeviceOrientationPortrait) ||
            (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
}

© Stack Overflow or respective owner

Related posts about iphone