1

I'm trying to make a long, multi-line text pop up in a UIAlertView and be scrollable. Unfortunately it's not scrollable by default. Am I missing something?

   NSString* messageString = @"long string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\nlong string\n";

    UIAlertView *alertView = [[UIAlertView alloc]
                              initWithTitle:@"Long Message Placeholder"
                              message:messageString
                              delegate:nil
                              cancelButtonTitle:@"OK"
                              otherButtonTitles:nil];

    alertView.userInteractionEnabled = YES;


    [alertView show];
  • Can you explain what your missing something ? – Suresh Thoutam Nov 11 '14 at 10:06
  • possible duplicate http://stackoverflow.com/questions/24671833/uialertcontroller-uialertview-scrolling-on-ios-8 – Anbu.Karthik Nov 11 '14 at 10:11
  • 1
    In iOS8 you shouldn't be using `UIAlertView` anyway. You should be using `UIAlertController` instead. From the docs... **Important: UIAlertView is deprecated in iOS 8. (Note that UIAlertViewDelegate is also deprecated.) To create and manage alerts in iOS 8 and later, instead use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert.** – Fogmeister Nov 11 '14 at 10:19

0 Answers0