Start by clearing all your limitations from everything so that we have a new slate.
Step 1: Create a hierarchy of your presentation. In this example, we need something like this:

In the view controller's view, which we will call parentView , there is a subview that we will call redView . That redView has a child, a text field that we will call textField .
The hierarchy is as follows:

Step 2: Define any restrictions specific to any individual species. In this case, we probably only want to set a width limit on our text view. So far, I just set the width to 200pts.

Step 3: Define the restrictions between the textView and its parent, redView . Let them say that we need a 10pt border. Add these restrictions:

As soon as we add these restrictions, we will receive warnings and errors in the automatic layout. Firstly, because the restrictions that I added for and to view the supervisor do not match the actual sizes, I will get a few warnings:

There will also be errors describing the lack of X and Y positions for redView and for textView . Here, if necessary, twice as many errors. textView knows where to place itself relative to redView . We do not need any more restrictions to sort the position of the textView . However, redView does not know where else to position ... and therefore, ultimately, textView also does not know exactly.
We can update the textView frame to get rid of the warnings, but release and correct the actual errors.
Step 5: set the redView restrictions relative to superView . redView already knows what size to be. Please note that we did not have errors for the width of redView . He just doesn't know where to be. In this case, I will go simply and say that we want redView be centered. Therefore, we want to add these restrictions:

Now we have fixed some problems. The only problem that remains is height for everything.
To fix this, we need to prioritize the size of the contents of the textView . Set them all to 1000 and change the "Internal Size" property to "Placeholder".

Currently, all auto-layout errors should disappear, and we should only be left with warnings because our storyboard framework does not match what our limitations say.
We can fix this by selecting parentView and updating all frames:


There is one final caveat to this auto layout puzzle when it comes to autosaving based on the size of the content: what happens if our text view does not contain content?
If there is no content in our text view, the auto market will select a height of 0, and our users will not even be able to see that there is a text view, but much less to add content (and expand it). When using automatic layout and content-based content determination, we almost always have to be sure that we set either explicit or minimum size to represent the content.
We donβt need to worry about our textView width, since we explicitly set it to 200. So add a minimum height constraint. Start by adding a height limit:

Now go to the size inspector for textView , find this height limit that we added, and change it to a limit greater than or equal to:

The storyboard will not reflect changes in the content in our textView and will textView accordingly, but your restrictions are now set correctly, and this will behave properly on your device or in the simulator.