skip to Main Content

I am new to iOS development and while designing with Storyboard I am stuck at below:

enter image description here

You can see that the View inside scroll view has much more width. the horizontal scrolling is working fine but how can I manage the width properly ?

Below are the constraints used in View:

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    The thing is I need to manage it from top to down approach. In Detail, First I need to check the constrains of Scrollview, It should be proper from all four sides, then Inner view should be also constrains as parent's width and height which is required.

    In this way, we can make it resolve and simply all constrains do not conflict with each other and works fine.


  2. Add a width constraint making your View equal to ScrollView. It looks like leading and trailing constraints between View, Stack View and Scroll view are in conflict and width will work better.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search