これまでiOSプロジェクトを国際化する際にはStoryboardファイルは対応言語分複数作る必要がありましたが、iOS6からは一つにまとめて、他の言語は.stringファイルで管理することが可能になります。これにより、Storyboardを変更した際もGUIによるレイアウトの変更は一回で良くなります。 ただしこれをやるとiOS5で動かなくなるので注意が必要です。 やり方 Use Base Internationalizationにチェックを入れる BaseにするStoryboardを選ぶ 僕のアプリは日本語主体で設計していたので、日本語を選択しています。英語の方が主体なら英語を選択した方が良いと思われます。 Localizeされたファイルができる この状態だとstoryboardが2つある従来の状態と一緒です。 .stringファイルを生成する Localizable Stringを選択す
Xcode で .storyboard(.xib)ファイルをローカライズすると各言語用の .storyboard(.xib)ファイルができる。 そして、そこに何かしら UIオブジェクトを追加しようとすると、全てのローカライズした .storyboard(.xib)ファイルに同じ UIオブジェクトを追加しなければいけない。 これはかな〜り面倒。 と、思っていたのだけど、各言語で共通の .storyboard(.xib)を作って、そこに各言語用の .strings ファイルを作成してローカライズができるって知ってビックリした。 今までずぅ〜っと知らなかったよ…。 更に、.strings ファイルは 1度作成してしまうと、その後で .storyboard にUIオブジェクトを追加しても .strings ファイルの内容はアップデートされない…。 しかし、これを自動的にアップデートするスクリプトも
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く