Reputation: 191
I am trying to use the following alert when I click a row in a table. I do get the alert but the title is half hidden. Can anyone please let me know how to make the entire title visible ?
uiViewForVoteSelection = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"Please amend member's selection by selecting one of the options"] message:@"" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Yes",@"No" ,@"Abstain",@"Not Selecting",@"Not Present",nil];
[uiViewForVoteSelection show];
Upvotes: 1
Views: 277
Reputation: 2911
Unfortunately, there is no way to completely customise alert view. I would advice you to stick with a smaller title and less no of buttons, more importantly if you use landscape orientation for iPhone. These many buttons won't fit. The buttons size and spacing is constant, so try with fewer buttons and smaller title.
Upvotes: 0
Reputation: 8649
The Problem is not the title, even a title like "Please" will be partially hidden. The cause is the number of buttons you added to the alert. If you want to keep the alert you should provide a bigger frame. But I would like to suggest you the use of an actionSheet for this kind of UI.
You can use the following UIAlertViewDelegate method :
- (void)willPresentAlertView:(UIAlertView *)alertView{
CGRect frame = <your_frame>
alertView.frame = frame;
}
Upvotes: 3
Reputation: 16941
Because the title is far too long. You should pick a short title and provide that string in the alert message.
Upvotes: 1