viewWillAppear:
テキストUITextView
がロード時に割り当てられる場合は、このコードをメソッドに追加するだけです..
yourTextView.frame = CGRectMake(yourTextView.frame.origin.x, yourTextView.frame.origin.y, yourTextView.frame.size.width, yourTextView.contentSize.height);
yourTextView.text=@"Your Text";
float fscrview = yourTextView.frame.origin.y + yourTextView.frame.size.height + 20;
yourScrollView.contentSize=CGSizeMake(320, fscrview);
例の場合。
yourTextView.delegate = self;
yourTextView.userInteractionEnabled = NO;
yourTextView.backgroundColor = [UIColor clearColor];
yourTextView.font = [UIFont fontWithName:@"Helvetica" size:12.0];
yourTextView.textColor = [UIColor whiteColor];
yourTextView.text = @"Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.<br />\r\nLorem ipsum dolor sit amet, consetetur sadipscing elitr.<br />\r\nLorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.<br />\r\nLorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr. Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.Lorem ipsum dolor sit amet, consetetur sadipscing elitr.";
yourTextView.frame = CGRectMake(yourTextView.frame.origin.x, yourTextView.frame.origin.y, yourTextView.frame.size.width, yourTextView.contentSize.height);
float fscrview = yourTextView.frame.origin.y + yourTextView.frame.size.height + 20;
yourScrollView.contentSize=CGSizeMake(320, fscrview);