views:

57

answers:

1

The content is about 230 lines. It does not appear in UITextView except when you click on it AND try to scroll down. Otherwise, it is a white blank view.

Any ideas why?

    UITextView *termsOfService = [[UITextView alloc] initWithFrame:CGRectMake(20.0, 100.0, 245.0, 170.0)];
    termsOfService.text = responseString;
    termsOfService.font = [UIFont systemFontOfSize:13];
    termsOfService.editable = NO;
    termsOfService.delegate = self;
    [alert addSubview:termsOfService];
+1  A: 

Probably because UIAlertView isn't intended to have subviews added to it. Just because you can, doesn't mean you should.

Jasarien
I would add that is is bad interface design to put a textview inside an alert. That is not what they are for.
TechZen
TechZen is right. It'll violate the HIG and Apple probably won't like it during review. I've seen apps that use text fields in the alert view for username/password capture, like the App Store app does, and Apple used to reject them from the store, but recently they seem to be allowing it... I still don't think they'd go for a 230 line text view in the alert though.
Jasarien