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....\".
For newline use the \n newline character in your text like this:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"test" message:@"this is a message\nthis is a new line text" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
Even with setMessage this works:
UIAlertView *alert = [[UIAlertView alloc] init];
[alert setMessage:@"this is\na test"];
[alert show];
[alert release];