画面の固定

iPad アプリは上下左右どこを上にしても対応できるようにすると規約に書いてあったので表示(固定)を解除する必要がある。
ちなみに、固定も出来るので、他の iPhnoe アプリにも応用できる。

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

このメソッドで決めている。上下左右どこを上にしても対応出来るようにするには BooleanなのでYESを返して上げる。

UIInterfaceOrientationPortraitはそのまま上で固定される。
UIInterfaceOrientationPortraitUpsideDownは180°反転する。(逆さま)
UIInterfaceOrientationLandscapeLeftは90°右回転する。
UIInterfaceOrientationLandscapeRightは90°左回転する。

ブラウザ

時々ブラウザとか固定したくなるんですよね。これでつくろうかしら。。