iPhone/iPad横向定位和UIAlertView

iPhone/iPad横向定位和UIAlertView,iphone,ipad,orientation,screen-orientation,Iphone,Ipad,Orientation,Screen Orientation,我正在使用Sparrow框架,并且我正在强制我的应用程序只面向横向。我的应用程序中有一个按钮,单击该按钮可打开UIAlertView。但是,如果我旋转(将方向从横向向右更改为横向向左(意味着home按钮位于右侧或左侧))并单击按钮打开UIAlertView——它会将其打开,但会倒置! 如何修复它?用 [[UIApplication sharedApplication] setStatusBarOrientation: [UIDevice currentDevice].orientation an

我正在使用Sparrow框架,并且我正在强制我的应用程序只面向横向。我的应用程序中有一个按钮,单击该按钮可打开UIAlertView。但是,如果我旋转(将方向从横向向右更改为横向向左(意味着home按钮位于右侧或左侧))并单击按钮打开UIAlertView——它会将其打开,但会倒置! 如何修复它?

[[UIApplication sharedApplication] setStatusBarOrientation: [UIDevice currentDevice].orientation animated: NO ]; 

固定

[[UIApplication sharedApplication] setStatusBarOrientation: [UIDevice currentDevice].orientation animated: NO ]; 


键盘不知怎么移入了。键盘不知怎么移入了。