iPod を iOS5 に、xcode を 4.2 に更新しましたが、どのアプリケーション ビューもランドスケープで実行されていません。次のことを行いました。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
この行のデフォルトは次のとおりです。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}
私の見解では、向きを横向きに設定しています。「サポートされているデバイスの向き」の下の要約では、横向きのみが選択されています。最後に、Info.plist に初期インターフェイスの向き = 横向き (左ホーム ボタン) を追加しました。
そのため、iOS5 を実行している iPod & iPhone シミュレーターで実行すると、デバイスは左に回転しますが、ビューはあまり動きません。
しかし、4.2 を実行している iPhone Simulator で実行すると、回転して横向きになります。
これが新しいiOS/xcodeで間違っているのか、それとも問題があるのか わかりません。
前もって感謝します。エリ
アップデートの問題は解決しました:それはによって引き起こされました
初期インターフェースの向き = 横 (左のホーム ボタン)
に変更しました
最初のインターフェイスの向き = 縦 (下のホーム ボタン)