读书人

iPad横版开发时阔高是反的

发布时间: 2013-08-16 14:29:57 作者: rapoo

iPad横版开发时,宽高是反的
#define SCREEN_WIDTH ((([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait) || ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown)) ? [[UIScreen mainScreen] bounds].size.width : [[UIScreen mainScreen] bounds].size.height)#define SCREEN_HEIGHT ((([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait) || ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown)) ? [[UIScreen mainScreen] bounds].size.height : [[UIScreen mainScreen] bounds].size.width)

?

?

源自:http://stackoverflow.com/questions/7905432/how-to-get-orientation-dependent-height-and-width-of-the-screen

读书人网 >移动开发

热点推荐