2011-12-04 2 views
1

私はランドスケープiPadアプリを作りたいと思います。 私は3つ以下のことをしました。シミュレータの向きは正しいランドスケープです。しかし、内容は90度間違っていますが、ストーリーボードのビュー、風景には正しいです。私がチェックする必要があるものはありますか?iOS:私のストーリーボードはランドスケープで、プロジェクトはランドスケープに設定されていますが、シミュレータではまだ間違っています

  1. 私は風景としてストーリーボードを設定しました。私はすでに設定

  2. 月プロジェクト「サポートされるインターフェイスの向きは、」=風景

  3. はまた、ビューコントローラでこのコードを使用:

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
    { 
    if (interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight) 
        return YES; 
    else 
        return NO; 
    } 
    
+0

のALLに次のコードを使用する必要があります - 私が狂いそう! –

答えて

0

あなたに設定してください。「最初のインターフェイスの向きを」作りますInfo.plistも同様です。

+0

ありがとう、私はやったが、まだ動作しません。私は同じ手順で新しいプロジェクトを作り直してから@@を実行します – homling

0

サポートされているインターフェイスオリエンテーションが1つです。私は、次のやったまで、それは私のために動作しませんでした:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); 
} 
0

あなたのviewcontrollers

私は正確に同じ問題を抱えている
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
     return (interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight) 
} 
関連する問題