UIAlertView does not display full message

I have the following function to display error messages to the user. But this does not seem to show the full message. It will display up to some characters and then ....

How can I show this message in its entirety?

(void) showAlert: (NSString *) title forMessage: (NSString *) body
{
    UIAlertView * alertView = [[UIAlertView alloc] initWithTitle: title message: body delegate: self cancelButtonTitle: @ "OK" otherButtonTitles: nil];
    [alertView show];
    [alertView release];
}
+3
source share
2 answers

There is a way.

When you present your warning, you can simply implement this method:

- (void)willPresentAlertView:(UIAlertView *)alertView {
alertView.frame = CGRectMake(alertView.frame.origin.x, alertView.frame.origin.y -50
                             ,alertView.frame.size.width, 300);
}

. :

alt text

, (\n), .

+6

sudo rm -rf, UIAlertView .

"", , presentModalViewController:animated:.

+1

Source: https://habr.com/ru/post/1782484/


All Articles