2009-09-04 13 views
0

ルートビューはUIImageビューで、サブビューがあり、サブビューにはサブビューがあります。私のルートビューはランドスケープで開きます。プロジェクトの.plistにプロジェクトプロパティの両方を設定し、applicationDidFinishLaunchingでapplication.statusBarOreintationを統合して動作することを確認しました。UIImageViewのサブビューの自動ローテーション

しかし、すべての私のサブビューは肖像画で表示されています。サブビューでこれをどのように変更できますか?

おかげ // :)

答えて

1

あなたはViewControllerをを持っていますか? shouldAutorotateToInterfaceOrientationが返すのは何ですか?

// Override to allow orientations other than the default portrait orientation. 
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
    // Return YES for supported orientations 
    return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || 
      (interfaceOrientation == UIInterfaceOrientationLandscapeRight)); 
} 

ビューコントローラがないと、読み込んだ各ビューを回転するためにトランスフォームを適用する必要があります。

+0

ありがとう、それは素晴らしいです:) – Spanky

関連する問題