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.
Baca Juga
- Using .html, .js File Saved In The Sandbox(documents Directory) Of An Ios App So That I Am Able To Open The Html File In Offline Mode As Well
- How To Call A Javascript Function Which Returns An Html String In Body Using Swift Webview?
- How Can I Send A File To Mail In Html Form Using Http Request In Nodejs Server Code?
UIDevice *device = [UIDevice currentDevice];
if ([device.model isEqualToString:@"iPad"])
{
}
else
{
}
Post a Comment for "Question About UIWebview And Universal Application"