关于UIWebview和Universal Application的问题

mst*_*rop 2 html iphone uiwebview universal

我有一个通用应用程序,我的问题是,如果可以在我的UIWebview中加载两个不同的html文件,具体取决于iDevice.

谢谢你的回答.

小智 7

你可以用这个......

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

}
else   //if device is iPhone
{


}
Run Code Online (Sandbox Code Playgroud)