This SO answer suggests ways to make a textView adjust to the quantity of text. The accepted answer does not work for me and I am thinking it may have to do with the fact that I created the textView in storyboard. Does anyone know of a way to adjust the textview to lines of content when using storyboard?
Note: I noticed examining the file inspector in Storyboard that auto layout is on by default. However, when I went to change this it gave me warnings regarding affect on other device types so I am reluctant to change this default.
code from linked to answer:
- (void)textViewDidChange:(UITextView *)textView
{
CGFloat fixedWidth = textView.frame.size.width;
CGSize newSize = [textView sizeThatFits:CGSizeMake(fixedWidth, MAXFLOAT)];
CGRect newFrame = textView.frame;
newFrame.size = CGSizeMake(fmaxf(newSize.width, fixedWidth), newSize.height);
textView.frame = newFrame;
}
Thanks for any suggestions.