Skip to content Skip to sidebar Skip to footer

Question About Uiwebview And Universal Application

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.

Solution 1:

you can use this...

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

}
else//if device is iPhone
{


}

Solution 2:

You can use UIDevice class.

UIDevice *device = [UIDevice currentDevice];    

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

}
else
{
}

Post a Comment for "Question About Uiwebview And Universal Application"