People enjoy the ability to pinch and zoom websites on their iPhones, iPads, and iPod Touch devices. Unfortunately, a nasty usability bug exists on iOS that causes a user-zoomable page to scale beyond the width of the viewport when the device’s orientation changes from portrait to landscape. As a result, the page ends up cropped by the viewport, and users have to manually zoom the page back out ag
NOTE! The LGPL below is copyrighted by the Free Software Foundation, but the instance of code that it refers to (the kde libraries) are copyrighted by the authors who actually wrote it. --------------------------------------------------------------------------- GNU LIBRARY GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor
こんにちは。開発担当の林です。 iPhone / iPad のウェブブラウザでページを見ているとき、けっこうな割合でピンチイン・ピンチアウトすると思いますが、それがどのくらい拡大されているのかを取得する方法を書きます。 また、応用でピンチイン・ピンチアウトされても、見た目のサイズを維持するにはどのくらい拡大すれば良いかということにも触れたいと思います。 広告バナーなんかでよく使われてるアレの仕組みです。何かのお役に立てれば幸いです。 ウェブページがどのくらい拡大されているのかを取得する // ページの幅 ÷ 表示されている幅(この行だけでいいかな) var zoomer = document.body.clientWidth / window.innerWidth; // 以下で拡大率を目視できるでしょう alert( zoomer ); // 小数点がたくさんつくので、第二位までに丸め込
Objective-CはJavaScript化しているという無茶なテーマで話してきました。釣りっぽい感じですが、OSとフレームワークと言語がこれだけのスピードで進化するプラットフォームもあまりないと思うので、その辺りの面白さを伝えられたらと思って喋りました。またCocoa勉強会のPDF冊子「Cocoa Life KOF2011特別編」にも同じテーマで文章を書いています。 発表資料は以下です。 Webエンジニアから見たiOS5 View more presentations from Satoshi Asano
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く