/ Published in: Objective C

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//Place this in the .m file outside any function. BOOL isiPhone(){ return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); } BOOL isiPad(){ return (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPhone); } //Then call it from any function like this: if (isiPhone()) { //This device is an iphone } if (isiPad()) { //This device is an iPad }
Comments
