Many iOS Developers have one common problem of using AutoLayout with UIScrollView. It is not that difficult, you just need to take fews things in mind.
Add Scroll View to the main UIView and give constraints with respect to UIView.
Add a content view (UIView) inside the ScrollView and give Top, bottom, left and right constraints w.r.t ScrollView. And also add equal width and equal height constraints w.r.t main UIView.
Set the equal height constraint’s priority to low if you need vertical scrolling
Now you can add any contents inside the Content View and add constraints w.r.t ContentView.
Hope you follow all the steps and be able to get AutoLayout with UIScrollView.
Like many people, YouTube has become my primary source of music. I listen to its automatic playlists all the time, and the fact that it seems to learn my preferences and introduces me to new music is just awesome. There is just one annoyance: YouTube ads Now, I don’t hate ads. I actually find them […]
With the increase in a number of digital devices, organizations are facing bandwidth issues. Users within the organization are downloading same content multiple times resulting in the consumption of international bandwidth. A simple solution might be to increase the bandwidth. But, can there be ways to solve this problem? The answer is “YES”. Caching servers […]