UIAlertViewの反転(iphoneSDK)
現在製作中のアプリは人対人で対面で交互に操作させるモードが
あり UIAlertViewを180度回転表示させたくなったのだが
UIAlertView *alert = [[UIAlertView alloc];
alert.transform = CGAffineTransformMakeRotation(M_PI*180/180.0f);
のようにしても効果がなかった。
調べてみるとdidPresentAlertViewをdelegateして
alertが表示完了後にtranformを変更すると回転した。
- (void)didPresentAlertView:(UIAlertView *)alertView
{
alertView.transform = CGAffineTransformMakeRotation(M_PI*180/180.0f);
}
ランドスケープ(画面を横にする)のに対応するだけであれば
下記のようなやり方もあるみたい
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];