cocoa touch - How to detect whether the host device is iPhone or iPad? -


possible duplicate:
best way programmatically detect ipad/iphone hardware

i preparing app in want use on iphone ipad.

how detect whether current host device iphone or ipad?

based on want make changes user interface

there many ways find in device app running.

[[[uidevice currentdevice] systemversion] floatvalue]; 

by using code can current device version, can check whether device iphone of ipad.

if (ui_user_interface_idiom() == uiuserinterfaceidiompad) {     // ipad-specific interface here } else {     // iphone , ipod touch interface here } 

regards,

satya


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -