デバイスの向きがかわって回転させないようにしたい 2011/10/15
2011/10/23

iosです。
デバイスの向きがかわって回転させないようにしたいです。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return false; }

すぐ忘れてしまうんですよね...
2011/10/23 追記

上記のコードだと、「It should support at least one orientation.」と警告ログがでる。
iphone - Ipad device orientation problem - Stack Overflow
方向を固定させたい向きかどうかで判定させるのがいいのかも。
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationPortrait); }

: