ipad - Why is [UIViewController presentModalViewController:animated:] transitioning the modal view in from the left? -


i'm building application supports landscape orientation on ipad under ios 4.3, though bug present under ios 4.2 well.

several places in application, showing uiviewcontrollers modal views. of them shown using pattern:

viewcontroller.modalpresentationstyle = uimodalpresentationformsheet; viewcontroller.modaltransitionstyle = uimodaltransitionstylecoververtical; [self presentmodalviewcontroller:viewcontroller animated:yes]; 

in places, work expected - modal form sheet slides in bottom of screen upward.

however, in 2 cases, modal form sheet slides in bottom left of screen. form sheet slides way right bottom of form sheet out of view. if focus text field , show onscreen keyboard, form sheet moves top center of screen expect be.

i don't think simulated metrics of xibs affect behaviour, have set orientation of them (both calling uiviewcontroller self , modal view controller viewcontroller) landscape.

any ideas why these 2 modal form sheets behaving differently others?

i think here dint return landscape orientation in shouldautorotate function use code if wan view landscape left/right:

- (bool)shouldautorotatetointerfaceorientation:(uiinterfaceorientation)interfaceorientation {     // return yes supported orientations     return (interfaceorientation == uiinterfaceorientationlandscaperight||interfaceorientation == uiinterfaceorientationlandscapeleft);     // return yes; } 

try may you..


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -