2

I have an Universal Application and my question is, if it is possible to load two different html files in my UIWebview depending on the iDevice.

Thanks for any answers.

mstottrop
  • 589
  • 5
  • 21

2 Answers2

7

you can use this...

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)//if device is ipad
{

}
else   //if device is iPhone
{


}
André Morujão
  • 6,963
  • 6
  • 31
  • 41
iAmitWagh
  • 453
  • 2
  • 13
0

You can use UIDevice class.

UIDevice *device = [UIDevice currentDevice];    

if ([device.model isEqualToString:@"iPad"])
{

}
else
{
}
Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131
Nanjunda
  • 11
  • 1