I have to ask it. Using
[[UIScreen mainScreen] applicationFrame]
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]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With