I have a text view inside a scroll view, I want to let the height of text view be dynamic as its content, because I don't want to scroll the text view alone, In fact I want to scroll the text view with the scroll view together.
In fact, I confused with the right menu of the image above, about the constraints height equals, less than, bigger than,...
I don't want to let the height stable, I want it dynamic, in my code:
CGRect frame = self.detailTextView.frame; frame.size.height = self.detailTextView.contentSize.height; self.detailTextView.frame = frame; scroll.contentSize = CGSizeMake(scroll.contentSize.width, 200 + self.detailTextView.frame.size.height); [self.detailTextView setFrame:frame];
which detailTextView is the name of text view, and scroll is the name of the scroll view.
But it doesn't work properly, what shall I do please help!
Note: Is there any relation between this issue and the checkbox of (use AutoLayout), because it is checked in my application