Nirav Zalavadia
Nirav Zalavadia

Reputation: 74

autolayout constraint not working

I want to implement scrollview (Horizontal scroll)with paging and one of the page also contains another scrollview (Vertical scrollview) but elements in scrollview not follow autolayout constraints.Please suggest me way to implement it.

Here also attached image what i want to implement it. here seachbar and btn i have applied constraint but its not working.

Thanks Nirav Zalavadia

Upvotes: 2

Views: 55

Answers (1)

krishnanunni
krishnanunni

Reputation: 510

Embed contents in the scrollview to a UIView. Set constraints to UIView withrespect to scrollview and set constraints to elements with respect to UIView.

While setting the constraints for UIScrollview and its container UIView, check whether the content size is setting correctly. Otherwise there is some problem with the constraints you have added.

Upvotes: 1

Related Questions