Possible Duplicate:
How to detect iPhone 5 (widescreen devices)?
I am creating an app using Xcode. I have noticed that with xcode 4.5, your storyboards can adapt to iphone 5 screen size. If I create two separate storyboards with the different screen sizes, but link the controllers to the same .h file, how can I tell the program which storyboard to load depending on the device?
eg: for the ipad, when I run, it picks the right storyboard automatically
iPhones of between 5 and 6 inches are the mid-size ones, though in practice they're almost all more towards the 6-inch end, coming in at either 5.5 inches or 5.8 inches, with the exception being the 5.4-inch iPhone 13 Mini and iPhone 12 Mini.
The iPhone 5 has a modestly larger screen, but because the housing is thinner and lighter than the iPhone 4 and iPhone 4S, the iPhone 5 doesn't really "feel" much bigger overall.
Check the notch, the frames, and the camera module very carefully. Most of the latest iPhone models are made of metal and glass, which together give a premium experience. Also, check for the lightning connector on the bottom, since iPhones do not come with USB Type C port like most Android phones these days.
The currently marked answer did not work for me so I created the method below to check if the current device has an 4 inch display.
- (BOOL)hasFourInchDisplay {
return ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone && [UIScreen mainScreen].bounds.size.height == 568.0);
}
Since that is the known height for the 4 inch display on the iPhone it is a good indicator.
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