2012-10-10 5 views
5

홈 스크린 북마크로 iPhone을 지원하는 데 필요한 메타 태그를 이전에 설정 한 웹 응용 프로그램이 있습니다. 웹 사이트는 사파리에서 잘 작동했으며 apple-mobile-web-app-capable의 책갈피가 yes로 설정되어 있으므로 홈 스크린 링크를 사용할 때 브라우저 컨트롤이 제거되었습니다.홈 화면 링크에서 iPhone 뷰포트 메타 태그 변경

iPhone 5가 출시되었으므로 페이지에있는 뷰포트 설정으로 화면 상단과 하단에 검정색 막대가있는 사이트가 표시되고 있음을 알았습니다. 이후로 내 뷰포트 메타 태그가 iPhone 5의 전체 화면을 사용하도록 변경했습니다. 홈 스크린 북마크가 새 뷰포트 태그를 사용하고 전체 화면으로 이동하는 유일한 방법은 북마크를 제거하고 다시 추가하는 것입니다. 그것.

홈 화면 북마크가 이미 설치된 모든 사람이 사이트를 전체 화면으로 이동하기 위해 제거하고 다시 추가 할 필요가 없도록 다른 설정 방법이 있습니까?

답변

5

이것은 Burlin이 Gist에서 찾은 해결책입니다. 치료를해라. https://gist.github.com/3840737

<!-- standard viewport tag to set the viewport to the device's width 
    , Android 2.3 devices need this so 100% width works properly and 
    doesn't allow children to blow up the viewport width--> 
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" /> 
<!-- width=device-width causes the iPhone 5 to letterbox the app, so 
    we want to exclude it for iPhone 5 to allow full screen apps --> 
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" /> 
+0

이것은 멋지지만 어떤 목적으로 두 개의 동일한 ID를 포함 시켰습니까? – fisherwebdev