开发者

"UIScreen mainScreen] applicationFrame]" for Landscape mode

开发者 https://www.devze.com 2023-03-25 20:21 出处:网络
I have to ask it. Using [[UIScreen mainScreen] applicationFram开发者_开发知识库e] Is a beautiful way to get the working area of the iphone or ipad in portrait mode. But, if I want get the same siz

I have to ask it. Using

[[UIScreen mainScreen] applicationFram开发者_开发知识库e]

Is a beautiful way to get the working area of the iphone or ipad in portrait mode. But, if I want get the same size in landscape, there are other code, or I will have to create:

CGRect landscape = CGRectMake(0, 20, 1024, 748)

This is even not generic for iPhone and iPad.


You can use [[[UIApplication sharedApplication] keyWindow] frame]

0

精彩评论

暂无评论...
验证码 换一张
取 消