Scrollview内にTextViewを挿入しようとしています。スクロールビューの動作はしますが、TextViewの内容は完全に表示されません。スクロールが表示されるためです。私はスクロールせずにTextViewの完全な内容を表示します。TextView autoheight in ScrollView
@implementation DetailViewController
@synthesize scroller;
-(void) setTextViewForRecipe:(Recipe *)theRecipe
{
[detailTextView setText:theRecipe.detail];
}
- (void)viewDidLoad {
CGRect frame = detailTextView.frame;
frame.size.height = detailTextView.contentSize.height;
detailTextView.frame = frame;
[scroller setContentSize: CGSizeMake(280, detailTextView.frame.origin.y + detailTextView.frame.size.height + 10)];
}