TiUIWebViewで作ったアプリ内ブラウザでページをロード中にインジケータがどこにも回ってないのに気がついて、くるくると回るインジケータを表示したいと思った。 ActivityIndicatorは作る方法があるので、このオブジェクトを作ってナビゲーションバーやツールバーに表示してもいいのだけど、今回はステータスバーに小さく表示したかったのでやり方を探した。 探した とりあえず本家のドキュメントやQ&Aを探しても見つけられなかったのでソースにダイヴ。 ちなみにステータスバーのインジケータのオンオフはObjective-Cでは以下のように簡単に書ける。 [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; [[UIApplication sharedApplication] setNetwor
TabGroupを使ったやり方と、NavigationGroupを使ったやり方がある。 TabGroupを使う オーソドックスなやり方。 TabGroupを作成し、Tabを追加。 Tabからウィンドウを開くやり方。 Tabにナビゲーションバーで遷移する機能がついている。遷移の状態はTabごとに保持される。 app.js var win, tab, tg; win = Ti.UI.createWindow({url: "first.js"}); win.hideTabBar(); tab = Ti.UI.createTab({window: win}); tg = Ti.UI.createTabGroup(); tg.addTab(tab); tg.open(); タブバーは必要がなければ隠す。 first.js Ti.UI.currentWindow.title = "Window 1";
面白いものをみてしまったので、僕も少しだけ ref - Titanium Mobileの暗黒ノウハウを公開します。 - このブログは証明できない。 Object の wrap って出来ないね。ってやつ Titanium.Database まわりを実装していたときのことなんですが DB の処理って大半は CRUD しかないから、それらを楽に扱えるように、wrapper を書こうと思って下記のようなコードを用意してみました。 Titanium.UI.setBackgroundColor('#000'); var copyArray = function(obj){ var result = []; for(var i = 0; i < obj.length; ++i){ result.push(obj[i]); } return result; }; var DatabaseWrapper
こんにちは、亀本です。 本当は今日はアシアルの日常を書く、という名目のブログ当番なんですが、どうせエンジニアの日常なんてコード書いてますよね。 ということで、最近使ってみたTitaniumについて書いてみる事にしました。 さて、最近ちまたでTitanium Mobileがあつい!という話が出ていて、入門記事もいろんなところで上がり始めていますね。 Titaniumをご存じない方のために簡単に説明しておくと、JavaScriptを使ってiPhone/Androidアプリを作ってしまおう、という物です。 果たしてどんなもんか!と、手元で作成中だったアプリをTitaniumを使って再実装してみたのですが、世間で言われるとおり所々で凝った事をしづらいものの、想像していたよりはずっと、リッチ・簡単・高速に作れる印象でした。 早い、安い、うまいなんてぎゅうどn(ry その開発の際に、Objective
Titanium というクロスプラットフォーム向けフレームワークがある。 ではじめの頃にすこし触れてみたものの、当時は使い道がなくすぐに飽きて、そのまま放置していた。しかし最近、仕事でスマートフォンアプリを手がける機会がありそうで、そうなればクロスプラットフォームが望ましいと考えていた。 そこで再び Titanium に白羽の矢を立てることになったのだが、環境構築にけっこう厄介な箇所があったり、Titanium 自体にない編集機能を補う必要があるなど、案外、開発の入り口に立つまでが大変だと思ったので、私なりの手順を覚え書きとしてまとめておく。 なお、完全なクロス開発をおこなう場合は Mac OS X が必要なのだけど、私は Mac を持っていないし、Titanium のプロジェクトはプラットフォームに依存しないので、この記事では Windows と Android を対象とする。また、開発
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く