height of the text view to be dynamic inside a scrollview

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. enter image description here

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


What the problem is? I have seen only one issue that you need to disable the scrolling of youtTextView.


Use following method for getting dynamic height of textfield as per text. 
 -(CGFloat) GetHeightFoText:(NSString *)aStrTxt  FoWidth:(int)aIntWidth ForFontSize: (int)aIntFntSize
  CGSize maximumLabelSize = CGSizeMake(aIntWidth,9999);
  CGSize expectedLabelSize = [text sizeWithFont:[UIFont systemFontOfSize:aIntFntSize]
  return expectedLabelSize.height;


 ? I want to enable ScrollView in TextView.When TextView Height Is Increased
 ? Autolayout ScrollView with dynamic content
 ? Using a textView and ScrollView in the same ViewController does not work? Swift
 ? How to adjust the height of a textview to his content in SWIFT?
 ? How to dynamically adjust height of UITextView
 ? Get number of lines in UITextView without contentSize.height
 ? Get number of lines in UITextView without contentSize.height
 ? Get number of lines in UITextView without contentSize.height
 ? Background Image for UITextView
 ? iOS7 UITextView contentsize.height alternative