Setting AutoLayout For UIScroolView
I Tried To Set AutoLayout For UIScrollView
But After Setting AutoLayout It Stops Scroll
Any Help Appreciated
Setting AutoLayout For UIScroolView
I Tried To Set AutoLayout For UIScrollView
But After Setting AutoLayout It Stops Scroll
Any Help Appreciated
Generally the ScrollView is used to fit and access all the contents. So follow the basic steps if you are dealing with ScrollView.
1- First take UIScrollView, then assign constraints as Top, Leading, Trailing and Bottom w.r.t. superview or any other view's.
2- Then you need to drag UIView inside the UIScrollView, then assign constraints to UIView as Top, Leading, Trailing and Bottom (all constant = 0) Also Give constraint Equal Widths w.r.t. UIScrollView.
3- Now inside the UIView drag your other Objects Like UILabel, UIButton,.. ETC, And provide respective constraint to them w.r.t. UIView.
4- Now till this you will get an error as ScrollView need y position, then just do add the bottom constraint to the last object inside the UIView w.r.t. UIView and customize it's constant to approx. 20 or 30. Which will let the scroll up when contents are finished inside the scrollview.
Hope this will help you.