I ran into the same problem as you, and all I could find was to check the orientation and calculate the height and width, as shown below:
UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; screenHeight = orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight ? 748 : 1004; screenWidth = orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight ? 1024 : 768;
These sizes are for the obvioulsy iPad, but it can work on the iPhone with the correct sizes.
Personally, I think he is a little poor, but I could not find anything else.
source share