LoginSignup
23
22

More than 5 years have passed since last update.

Xcode5でiOS5.1対応のアプリを作る

Last updated at Posted at 2014-02-19

初代iPadでも動くアプリを作る必要があり、なかなか苦戦したのでメモ。

手順

1.プロジェクトナビゲーターでプロジェクトを選択
2.「Target」「Build Settings」「Architecture」を「ARCHS_STANDARD_32_BIT」へ変更
3.「Target」「General」「Deployment Info」「Deployment Target」が「5.1」へ変更できるようになるので変更
4.「Project」「Info」の「iOS Deployment Target」も「5.1」へ変更
5.「Project」「Info」下部にある「Use Base Internationalization」のチェックをはずす
 チェックをはずすと「Do you want to remove the Base localization」と出てくるので
 「Delete localized resources files from disk」にチェックを入れず「Remove」を選択
 *国際化したStoryboardをまとめられるのはiOS6からのため
6.「Finder」を開いて対象プロジェクトフォルダの中にある「Base.lproj/Main.storyboard」を「en.lproj」へ移動する
7.6で移動させた「Main.storyboard」をプロジェクトへ追加する
8.「Main.storyboard」を開き「ファイルインスペクタ」にある「Use Autolayout」のチェックをはずす。
 *AutolayoutはiOS6からのため

その他注意点など

・Marvericksの場合はシミュレーターがインストールできないので実機でしか実行できずorz
・iOS5以降でしか使えない機能に注意、バージョン判定して分岐させるなどの対応が必要
 UITableViewController の preferredContentSize や UITableView の dequeueReusableCellWithIdentifier など

2014/05/05 追記

・MasterView に TabBarController を追加した場合は TabBarController の shouldAutorotateToInterfaceOrientation: も実装しないと回転してくれない。

23
22
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
22