I need to display multiple lines of text in the message of my UIAlertView. I have tried adding a \'\\n\', but it has no effect. It still displays: \"This is an examp....\".
Here is some simple code to resize the messages in an alert. Note that the alert's frame needs to be large enough. You can pad the initial alert with a few newlines.
for (UILabel *l in alertView.subviews){
if ([l isKindOfClass:[UILabel class]]){
float w = l.frame.size.width;
[l setNumberOfLines:0];
[l sizeToFit];
CGRect r = l.frame;
r.size.width = w;
l.frame = r;
}
}