我正在尝试找出如何使Dashcode Web应用程序区分iPhone浏览器和iPad浏览器。一个可行的例子是Apple iPad用户指南。iPad将显示一个流畅的dashcode构建的界面,而iPhone则会被重定向到网页。
我在Howto force DashCode question中找到了一些帮助。
我正在编辑redirector.js文件。以下内容强制iPad使用由Dashcode构建的Safari布局,而不是Mobile Safari,这正是我想要的。当从iPhone浏览时,它会返回一个文件未找到错误。
我在Howto force DashCode question中找到了一些帮助。
我正在编辑redirector.js文件。以下内容强制iPad使用由Dashcode构建的Safari布局,而不是Mobile Safari,这正是我想要的。当从iPhone浏览时,它会返回一个文件未找到错误。
// redirect to the more appropriate product
if (DCProductURLs["mobileweb"] && DCshowiPhone) {
// Changed case so that the Safari layout is displayed on iPad
// window.location.href = DCProductURLs["mobileweb"];
window.location.href = DCProductURLs["desktop"];
}
感谢任何建议。