iPhone development: what will [[UIDevice currentDevice] model] return for "iPad"?

g.revolution picture g.revolution · Mar 26, 2010 · Viewed 12.6k times · Source

What will [[UIDevice currentDevice] model] return for "iPad"?

Answer

timv picture timv · Jun 16, 2011

I tried using containsString but it was not allowed with xcode4

Here is how I solved it:

if ([[[UIDevice currentDevice] model] hasPrefix:@"iPhone"])
    {

Hope this helps even if its a bit late.