shouldAutorotateToInterfaceOrientation:
画面が自動的に回転しようとするときに呼び出されるデリゲートメソッド。
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
解説
画面が自動的に回転しようとするときに呼び出されるデリゲートメソッド。
YESを返すと自動回転を許可、NOを返すと自動回転を許可しない。
簡単なビューのサイズ調整
contentModeをUIViewContentModeScaleAspectFill
clipsToBoundsをYESにする。
ビューの配置調整は
willAnimateRotationToInterfaceOrientation:durationで再配置する。
返り値
( BOOL )
YESを返すと自動回転を許可、NOを返すと自動回転を許可しない。
引数
( UIInterfaceOrientation )interfaceOrientation
UIInterfaceOrientation
アプリケーションのインターフェースの向き
UIInterfaceOrientationPortrait | 縦向き |
UIInterfaceOrientationPortraitUpsideDown | 縦向き、上下逆 |
UIInterfaceOrientationLandscapeLeft | 横向き、左 |
UIInterfaceOrientationLandscapeRight | 横向き、右 |
フレームワーク
UIKit
クラス
UIViewController
Instance Methods
使用可能
iPhone2.0