Titanium Mobile は JavaScript で iPhone/Android のアプリ (not Webアプリ) を開発できる開発環境。詳しくは Titaniumで始めるモバイルアプリ作成の基礎知識 (1/3):Web技術でネイティブアプリを作れるTitanium(2) - @IT などに解説があります。 少し時間があったので、JavaScript で作るというのがどんな感じか試してみました。作ったアプリは こんな感じで TableView があり、選択すると WebView でアプリ内ブラウザが立ち上がる、ブラウザはツールバーで「戻る」や「リロード」が可能。あとはタブコントロールがあったり・・・という単純なもの。初期起動画面のサイトリストは、HTTP でローカルに立てたサーバーから JSON で読み込んでいます。 Web上のドキュメントを見ながら2, 3時間試行錯誤で一応の
JavaScriptの利用範囲がどんどん広がっています。ライブラリの充実によって、比較的手軽にいろいろなことができるようになり、Webサイト/Webアプリケーションだけでなく、今やモバイルデバイスやデスクトップアプリケーションなどの分野でもJavaScriptが活躍するようになりました。 本連載では、多数のJavaScript関連書やASCII.jpの連載「29分でできる!あのサイトの技を盗め」の執筆でもおなじみの古籏一浩氏が、最新のAjax/JavaScriptライブラリの解説から、今後注目される新しいJavaScriptの活用Tipsまで、“楽しくできて役立つネタ”をお届けします。 初回は「iPhone 3GS」に合わせてリリースされたiPhone OSの新バージョン「iPhone OS 3.0」がテーマです。iPhoneならではのGPS機能をSafariのJavaScriptで活用す
3日に書いたiPad readyの記事で紹介したNikeのサイトがヘッダーを固定していたのでてっきりiPadはiPhoneで使えなかったCSSの「position: fixed」が使えるのかなと思ったらやっぱりiPadでも「position: fixed」は使えなくて、代わりに「iScroll」というJavaScriptライブラリで実現していたと知ってびっくり。 これを使えばiPhoneでも「position: fixed」に相当するデザインを実現できそうです。デモはこちら ただしこれを使うと、逆に通常のブラウザではスクロールできなくなるので注意が必要です。上のデモもPCでは機能しません。 使い方は簡単で、JS読み込んでスクロールさせるdivにIDつけて、その親divにもIDつけてあとCSS指定するだけ。詳しくはデモのソースを見れば分かります。2つのdivの間に違う要素が入るとダメみた
こんちは、中村です。 先日マピオンラボよりリリースしたiPad用地図「マピオンタッチ デラックス」のコアとなるフリースクロール地図ライブラリの開発を担当させて頂きました。せっかくなのでターゲットブラウザをMobileSafariに設定し、比較的スペックがプアなiPhone3Gや3GSでも十分な速度で動作するようJavaScript部分の高速化をアレコレ調べてみたのでまとめてみます。一番低スペックなiPhone3Gで実際にどの程度早くなるかをタイマーで計測してみましたってのが本エントリーのミソです。 JavaScriptパフォーマンスチェック - Googleドキュメント 1. new Object より {}(Objectリテラル) オブジェクトを1万個生成するならばリテラルで記述することで約26ms高速化! loop=10000; for(var i=0;i<loop;i++){}; /
Webアプリケーションは、傾きセンサやGPSからの情報取得やバイブレータ動作などのOSの機能の利用に制限があります。また、オフラインでの動作ができません。 開発の容易さは、若干主観めいてしまいますが、コンパイルが必要でメモリ管理も必要なネイティブアプリに比べて、Webブラウザでリロードするだけで最新のコードをテストできて、基本的にメモリ管理も不要なWebアプリケーションに軍配が上がります。 ネイティブアプリケーションの最大のメリットは、「App Storeでの配布ができる」ことで、多くのユーザーが集まるApp Storeでアプリケーションを配布でき、さらには課金もできてしまう点です。 ローカルWebアプリという第3の選択肢 前段の機能比較表に「ローカルWebアプリケーション」という項目があります。これは、Safariでオンライン中に所得したHTML、CSS、画像データなどを保存して、オフラ
UIWebViewはiPhone SDKのかなり重要なUIKitのクラスです。 ご存知の通りSafariが丸ごと入ってますが、しかし、ウィンドウを開く、ポップアップするというイベントは無効にされています。 <a href="somehere" target="_blank" />Open this link in new window</a> たとえば、このようなリンクがUIWebViewのなかで表示されてユーザがクリックしたとしても、何も起きません。 勿論、UIWebViewはかなり高度に抽象化されていて、いくつかのメソッドを呼ぶ事はできます。 そこで、完璧ではないのですがある程度この問題を解決する手段があります。 鍵となるメソッドは次のものです。 language:objc - (BOOL)webView:(UIWebView *)webView shouldStartLoadWith
最近、iMovatwitterというiPhoneアプリを出しました。 iPhoneのブラウザは携帯電話のようにGPSやデジカメとインテグレーションすることを考えられていないので、GPSを使った「イマココ」や、デジカメと連携する「写ツ」をiPhoneで使うためにアプリ側で吸収しました。 このアプリでやりたかったことの一つが、UIWebViewというブラウザコントロールとWebサービス/アプリとの連携でした。 UIWebViewというのは、SafariをiPhoneアプリ内に組み込むコントロールです。 丁度、Flash PlayerをHTMLに組み込むようにWebブラウザをiPhoneアプリ上に表示することができます。 このiPhoneアプリ上のWebブラウザとWebサービスの主な連携ポイントとしては、大きく3つあります。 1.iPhoneアプリからWebページを制御する 2.Webページのメ
写真は撮るだけでは面白くない。見せ方が重要だ。例えばiPhoneやiPod Touchは液晶の大きさもあって、写真を皆に見せるのに便利なインタフェースだ。だが、ただ写真をリストアップしたり、アルバムに入っているものを見せるだけでは面白くはない。 iPhoneに最適化されたカバーフロー表示を行うJavaScript オンラインに写真をアップロードしているなら、Safariを使ってこんな見せ方も実現できるのだ。 今回紹介するオープンソース・ソフトウェアはcss-vfx、iPhone用Safari向けのカバーフローアクションだ。 Mac OSXではカバーフローという表示方式がある。写真や音楽を見せるのに向いた、格好のいい表示方式だ。中央にメインの画像を配置し、周囲に前の画像、次の画像を配置する。それをSafariで実現するのがcss-vfxだ。 拡大表示しているところ 反射や左右の写真の傾きも再
VolnaTechは、HTML/JavaScriptでiPhone/iPod touchネイティブアプリを開発するためのライブラリ「NimbleKit 1.2」を公開した。動作環境はIntel製CPUを搭載したMac、Mac OS X Leopard 10.5以降、Xcode。別途iPhone SDK 2.2以降が必要。 HTMLとJavaScriptでネイティブなiPhoneアプリの開発が可能になる「NimbleKit」 NimbleKitは、HTMLとJavaScriptを使用してネイティブなiPhone/iPod touchアプリを開発するためのライブラリ。iPhone OS 2.2以降に対応、一部機能はiPhone OS 3.0の正式リリース後に提供される。ライブラリの全機能は無償利用できるが、動作はiPhoneシミュレータ上に限定され、実機上での利用には有償のユーザ登録 (99米
iPhone向けのアプリケーションを開発する場合、Objective-Cを習得する必要がある。オブジェクト指向の言語ではあるが、習得のためにはコストがかかるのは確かだ。開発することで一気に世界が開ける可能性もあるが、利用範囲の限られた言語を覚えることに躊躇してしまう人もいるのではないだろうか。 スプラッシュスクリーン そこで普段使い慣れているHTMLやJavaScriptを使ってアプリケーションを構築しようと言うのがこのフレームワークだ。 今回紹介するオープンソース・ソフトウェアはBig Five、Webベースの技術で実現するiPhone/iPod Touchアプリケーションフレームワークだ。 Big Fiveは言わばプロキシを提供するソフトウェアだ。HTMLからJavaScriptを使ってiPhone/iPod Touchの各APIにアクセスを可能にするのだ。現在位置の取得、内蔵カメラを
いつ出るか、いつ出るかと待ち遠しかったがついに登場した! Mac OSXのインタフェースが優れていることは大多数の人が認めるだろう。Windowsには感じられない、エレガントなインタフェースはMac OSXやiPhoneなどで活躍している。あのインタフェースをWebブラウザ上で実現できたらどれだけ良いだろう。 サンプルアプリケーションのflickrビューワー Ajaxを使ったGmailをはじめて触ったときのあの驚きを再び感じさせてくれるのがこのソフトウェアだ。 今回紹介するオープンソース・ソフトウェアはCappuccino、Webブラウザ上でCocoa風インタフェースを実現するアプリケーションフレームワークだ。 Webベースでありながら、JavaScriptを記述する必要はない。Objective-Cに似た、Objective-Jというプログラム言語で記述して、それをWebブラウザ向けにJ
2008年07月29日 よろしい、ならばiPhoneでくぱぁだ iPhoneユーザーの皆さんこんにちは!くぱぁ(i)をリリースしました! くぱぁ(i)はiPhone/touchで直感的にくぱぁできるWebサービスです。 DEMO http://hayashi311.googlepages.com/cupha.html くぱぁってなります。心の目で見てください!まさにiPhoneの正しい使い方って感じですよね! iPhone/touchを持ってない人はよく分からないと思いますが、こんな風になってます。 マルチタッチとcanvas要素の練習に作ってみました。 追記:画像を挿入できるようにしました! コード window.addEventListener("load", loaded, false); window.onorientationchange = hideURLbar; var st
iPod touchのSafariをさらに活用するには、ブックマークレットを使うといい。「公衆無線LANへの一発ログイン」「ページ内検索」「リンクを新しいタブで」「携帯向けページに変換」といったブックマークレットをまとめた。 iPod touchを日頃の情報ツールとして使う人が増えてきている。いわゆる“PC”ではない端末として、特にすごいのがWebブラウザ──Safariだ。 しかしこのWebブラウザは、Webを表示するということ意外では、必要最低限の機能しか備えていない。ページ内の検索もできないし、タブブラウザなのに“新しいタブに開く”こともままならない。なんとかならないものか。そのカギが、ブックマークレット(Bookmarklet)である。 ブックマークレットとは、短いJavaScriptをURLの代わりにブックマークに登録し、ブラウザ上でプログラムを走らせることができるもの。これをう
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く