UIWindow frame in ios 8 different from ios 7 in Landscape

◇◆丶佛笑我妖孽 提交于 2019-12-05 03:06:15
fdiaz

Probably in your AppDelegate you initializing your UIWindow like this

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

Prior to iOS8 the bounds property of UIScreen returned the bounding rectangle of the physical screen (that is, portrait), but starting from iOS8 bounds changes when the device rotates documentation.

You can now use nativeBounds instead if you'd like to get the bounding rectangle of the physical screen.

Note: nativeBounds returns the screen in pixels but bounds returns it in points.

My solution for this issue was just to ignore the:

CGAffineTransformMakeRotation

on iOS8 and now everything works for me! thanks :)

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