cfisher cfisher - 2 months ago 14x
Objective-C Question

Forcing UIAlertView into landscape mode

I need to display a UIAlertView in landscape mode. I tried the obvious, setting the transform in the

delegate method to no avail:

-(void) willPresentAlertView:(UIAlertView *)alertView {

alertView.transform = CGAffineTransformMakeRotation(M_PI_2);

Any suggestions on how to fix this?


Have you tried in the didPresentAlertView?

- (void)didPresentAlertView:(UIAlertView *)alertView
    // UIAlertView in landscape mode
    [UIView beginAnimations:@"" context:nil];
    [UIView setAnimationDuration:0.1];
    alertView.transform = CGAffineTransformRotate(alertView.transform, 3.14159/2);
    [UIView commitAnimations];