Gamerlegend Gamerlegend - 1 year ago 173
Swift Question

How to check if iPad is iPad Pro

The new iPad pro has different dimension and resolutions. If I check based on screen width would it be correct? I havent upgraded to Xcode 7.1 nor do I have the device so I can't check it yet. Will this check work?

if([UIScreen mainScreen].bounds.size.width>1024)
// iPad is an iPad Pro

Answer Source

So far this macro seems to do the trick without any issues.

#define IS_IPAD_PRO (MAX([[UIScreen mainScreen]bounds].size.width,[[UIScreen mainScreen] bounds].size.height) > 1024)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download