길이 이야기(Giri's Story)

아이폰 웹 어플 개발 / web app meta 속성 본문

IT기술,개발/모바일

아이폰 웹 어플 개발 / web app meta 속성

길이 2010. 3. 5. 18:49

<meta name="viewport" content="width=device-width,height=device-height,user-scalable=yes,initial-scale=1.0">

 

 

아이팟/아이폰 에서의 웹 인식 메타태그인 viewport 수정으로 일부 웹 어플리케이션과 비슷한 효과를 낼 수 있습니다. 실질적인 ipa 개발과는 조금 우회적인 방법으로 웹환경을 이용하는 wifi망에서 작업을 할 때 용이한 프로그래밍을 할 수 있습니다.

 

device-height / device-width  - 모바일 장비의 수평과 수직 스케일

user-scalable=yes - 사용자가 줌 인/아웃을 가능케 할 것인지 여부 네이버모바일은 설정 no

initial-scale=1.0 - 실제 보이는 화면을 조금 더 큰 비율로 먼저 확대해서 보여주는 옵션 숫자가 클수록 확대

 

애플에서 발췌한 옵션값 내용

Table 1  Viewport properties

Property

Description

width

The width of the viewport in pixels. The default is 980. The range is from 200 to 10,000.

You can also set this property to the constants described in “Special viewport property values.”

Available on iPhone OS 1.0 and later.

height

The height of the viewport in pixels. The default is calculated based on the value of the width property and the aspect ratio of the device. The range is from 223 to 10,000 pixels.

You can also set this property to the constants described in “Special viewport property values.”

Available on iPhone OS 1.0 and later.

initial-scale

The initial scale of the viewport as a multiplier. The default is calculated to fit the webpage in the visible area. The range is determined by the minimum-scale and maximum-scale properties.

You can set only the initial scale of the viewport—the scale of the viewport the first time the webpage is displayed. Thereafter, the user can zoom in and out unless you set user-scalable to no. Zooming by the user is also limited by the minimum-scale and maximum-scale properties.

Available on iPhone OS 1.0 and later.

minimum-scale

Specifies the minimum scale value of the viewport. The default is 0.25. The range is from >0 to 10.0.

Available on iPhone OS 1.0 and later.

maximum-scale

Specifies the maximum scale value of the viewport. The default is 1.6. The range is from >0 to 10.0.

Available on iPhone OS 1.0 and later.

user-scalable

Determines whether or not the user can zoom in and out—whether or not the user can change the scale of the viewport. Set to yes to allow scaling and no to disallow scaling. The default is yes.

Setting user-scalable to no also prevents a webpage from scrolling when entering text in an input field.

Available on iPhone OS 1.0 and later.

Table 2  Special viewport property values

Value

Description

device-width

The width of the device in pixels.

Available on iPhone OS 1.1.1 and later.

device-height

The height of the device pixels.

Available on iPhone OS 1.1.1 and later.

링크 : http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html

'IT기술,개발 > 모바일' 카테고리의 다른 글

각 핸드폰별 지원하는 이미지, 벨로리 포맷  (0) 2007.01.03
[LGT] Lion Browser Header  (1) 2007.01.03
[LGT] STI/LGT-UP Browser Header  (0) 2007.01.03
[LGT] AUR Browser  (0) 2007.01.03
이통사별 브라우저 정보  (0) 2007.01.03
[KTF] ME/KUN Browser Header  (0) 2007.01.03
Comments