This type of question has been asked before but here me out.
I have a UIViewController with two container views both of which embeds a table view.
The top tableview is dynamic while the bottom one is static. And there is a textfield inside a cell in the bottom tableview. So I want to scroll everything up when you tap the textfield and the keyboard appears. To do that I have put both the container views inside a scrollview.
I have the scrollview pinned to all four sides. And I have added leading, top, trailer constraints and also horizontal center constraint (I get a ambiguous scrollable content width error if not) to the top container view. And for the bottom container view, I added leading, bottom, trailing constraints. And also a vertical space constraint between the two container views.
But I still get the ambiguous scrollable content height error. I found that the answer to this issue is to ensure that you have enough constraints from top to bottom and I seem to have all of them. I can't figure out why I have this problem still. This is what it looks like when I run the app.
Am I missing something else?
Dropbox link to a demo Xcode project.