"UIScreen mainScreen] applicationFrame]" for Landscape mode
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]
精彩评论