If you add the scrollview and give 4 corner constraint then it will give the ambiguity error. here are steps how we fix this issue.
Step 1: Add ScrollView to the ViewController XIB or storyboard Add constraints to all four corners.
Step 2: Add a UIView inside the UIScrollview and add constraints with the scrollView to all four corners.
Step 3: Set equal width between the UIView and the scrollView. Add height to the UIView (If the height is greater than the height of the device, It automatically becomes scrollable). Now view inside scrollview have 6 constraints.
Step 4: Add the other UI whatever you want inside uiView.
Here are live demo watch: https://www.youtube.com/watch?v=nvNjBGZDf80