How to know if we are on an iPad or on an iPhone [duplicate]
Possible Duplicate:
API to determine whether running on iPhone or iPad
Hi,
I'd like to test the device in my application, to know wether I'm on a iPad device or on an Iphone.
is there a easy way to do that ?
thank's au lot
David
All you need is this:
UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad
http://github.com/erica/uidevice-extension/blob/master/UIDevice-Hardware.m
Note too that any number of search engines will work for this also (SO and google come to mind). And they will be PHENOMENALLY faster that posting and waiting. Just saying.
精彩评论