veerendra pratap singh
veerendra pratap singh

Reputation: 235

scrollview has ambiguous scrollable content height & Width

How Can i solve it. I try all type of constraints like top, bottom, left , right, horizontally, vertically, also equal height and width plz see the link below for image

Upvotes: 2

Views: 13345

Answers (1)

LGP
LGP

Reputation: 4333

Scroll views are special when you set constraints. Because they have an undefined content size you must set constraints for both its contents' sizes and edges. Setting only top, bottom, left, right is not enough, also set height and width.

Try this. Add a single UIView to an otherwise empty scroll view. Then tie the edges of the view to the scroll view. Finally set the height and width to fixed size.

Read more

Upvotes: 15

Related Questions