I am trying to detect iPad Pro device , trying to guess its height with :
NSLog(@"%f",self.view.frame.size.height);
But it returns 1024
! same as iPad non retina devices . any advice ?
I need to specify some codes exact for iPad Pro with this line of code :
#define iPadPro ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && [UIScreen mainScreen].bounds.size.height == 2732)
...and the codes must detect iPad Pro even on iOS simulator !
Thanks
EDITED : Some suggest use LunchScreen , but when I use it this happens (scaled down) :
On iPad Pro 11-inch (2nd generation and later) and iPad Pro 12.9-inch (4th generation and later), you can use the Magnifier app to detect people and help you maintain a physical or social distance from others. When iPad detects people nearby, you're notified with sounds or speech.
You can see the profiles you have installed in Settings > General > Profiles & Device Management. If you delete a profile, all of the settings, apps, and data associated with the profile are also deleted.
Look on the back of your iPad. Open Settings, tap General, then tap About. Look for the model number in the top section.
Use the Find My app to locate and play a sound on a missing iPhone, iPad, iPod touch, Mac, Apple Watch, AirPods, or Beats headphones (supported models). In order to locate a device, you must turn on Find My [device] before it's lost.
Special thanks to @rmaddy
The proper way to detect screens sizes is :
NSLog(@"%f",[UIScreen mainScreen].bounds.size.height);
Now if your application runs in Portrait
mode you can simply use this code to detect iPad Pro :
#define iPadPro ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad && [UIScreen mainScreen].bounds.size.height == 1366)
Don't forget the need to use a LaunchScreen or the app won't take advantage of the iPad Pro's larger screen
detect iPad pro 12.9 inch no matter device's orientation
#define iPadPro12 (UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad && UIScreen.mainScreen.nativeBounds.size.height == 2732)
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