UIAlertView in iOS8 appearing off-center, mis-placed, only portion of the screen dimmed

人走茶凉 提交于 2019-11-29 14:55:38

I met a similar issue with iPhone, this happens when the application supports multiple rotation mask and is forced to strictly one. Basically, the viewController for example has shouldAutoRotate = NO, this only affects the view controller not the current window which is the alertView presented by the UIWebView.

Try implementing application:supportedInterfaceOrientationsForWindow Here is an example:

-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
    return (enablesRotation == YES) ? UIInterfaceOrientationMaskAllButUpsideDown : UIInterfaceOrientationMaskLandscape;
}

This tells that the current window must follow the desired supported orientation mask. Hopes this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!