UIAlert only work in portrait, not landscape

April 23, 2009 § 1 Comment

If you use landscape orientation as default on info.plist, any UIAlert will show up on Portrait instead of Landscape mode.

You can’t rotate UIAlert object like UIImageView.

If you rotate before [alertView show];
then UIAlert will stretch as wide as landscape’s width and as tall as the original portrait size. It won’t fit within landscape screen.

If you rotate after [alertView show];
then UIAlert stay in portrait mode

If you rotate after initization UIAlertView *alertView;
and before loading
alertView = [[UIAlertView alloc] initWithTitle:@”Welcome” message:@”Make sure headphones are plugged in if you use an older iPod Touch.” delegate:self cancelButtonTitle:@”OK” otherButtonTitles:nil];

you’ll get the following warnings on Console
This GDB was configured as “i386-apple-darwin”.warning: Unable to read symbols for “/System/Library/Frameworks/UIKit.framework/UIKit” (file not found).
warning: Unable to read symbols from “UIKit” (not yet mapped into memory).
warning: Unable to read symbols for “/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics” (file not found).

§ One Response to UIAlert only work in portrait, not landscape

  • Harish says:

    If this could be of any help to you…

    I had the same issue, but later figured out with the help of some good blogs that you can change the orientation of your status bar to reflect the changes in your UIView! Change it to landscape (In my case, I changed it even though it was hidden), and the alert popped up in landscape!

    –Cheerio!–
    Harish.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading UIAlert only work in portrait, not landscape at Web Builders.

meta

%d bloggers like this: