My UIAlertView has a message and 3 buttons, my problem is the alert view display normally in portrait but it hides message in landscape mode as below screenshots. How to make the message appears? Thanks in advance.
I too got same problem,
But I solved this, with a small change. like add "\n\n"
at the end of Title
in the alertView
This is not a correct solution. but this will rectify that problem some what.
*Note : The Title and the Message should be of one line text.
Thanks,
Satya
By merging the Title String into the Message String you can fit two lines of landscaped text. Localization wise, this is a problem for many of us so I'm going to file a bug with Apple as it appears we aren't the only ones dealing with this problem.
Note: Any LS_ strings in my system are referenced from the Localizable.strings file.
So I went from:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"LS_Prompt_RateApp_Title", NULL)
message:(@"LS_Prompt_RateApp_Message", NULL)
delegate:self
cancelButtonTitle:NSLocalizedString(@"LS_Prompt_RateApp_Never", NULL)
otherButtonTitles:NSLocalizedString(@"LS_Prompt_RateApp_OK", NULL),
NSLocalizedString(@"LS_Prompt_RateApp_Cancel", NULL),
nil];
I have screenshots but it won't let me due to being a new account so here's a text version:
[ TITLE LINE 1 ]
[ ] ( message is clipped )
[ Button #1 ]
[ Button #2 ]
[ ]
[ Button Cancel]
to:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"LS_Prompt_RateApp_Prompt", NULL)
message:NULL
delegate:self
cancelButtonTitle:NSLocalizedString(@"LS_Prompt_RateApp_Never", NULL)
otherButtonTitles:NSLocalizedString(@"LS_Prompt_RateApp_OK", NULL),
NSLocalizedString(@"LS_Prompt_RateApp_Cancel", NULL),
nil];
I have screenshots but it won't let me due to being a new account so here's a text version:
[ TITLE LINE 1 ]
[ TITLE LINE 2 ] ( message == NULL )
[ Button #1 ]
[ Button #2 ]
[ ]
[ Button Cancel]
来源:https://stackoverflow.com/questions/7901834/uialertview-with-3-buttons-hides-message-in-landscape-mode