title: Issue with horizontal scrollview inside a vertical scrollview in ios swift
body: <p>My layout is currently like this:<br><br>
  View <br>
    -- View <br>
    -- Vertical ScrollView <br>
       ------ View <br>
          --------- Horizontal Paginated ScrollView <br>
          --------- View <br>
             ------------- Horizontal ScrollView -- not working properly <br></p>
  
  <p>See this image for view hierarchy screenshot from xcode: <br></p>
  
  <p><a href="https://i.stack.imgur.com/7g2zU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7g2zU.png" alt="enter image description here"></a></p>
  
  <p>Using <strong>Swift</strong>.</p>
  
  <p>I am adding subviews dynamically to this "Size Select Scroll View"</p>
  
  <p>Two Issues:</p>
  
  <ol>
  <li>After adding views, there is no margin between the subviews. Each subview's coord. are like this: (10.0, 0.0, 44.0, 44.0), (54.0, 0.0, 44.0, 44.0), (98.0, 0.0, 44.0, 44.0), (142.0, 0.0, 44.0, 44.0) etc.</li>
  </ol>
  
  <p>But the appearance is like this without the 10 points gap between each subview: <a href="https://i.stack.imgur.com/mCGRW.png" rel="nofollow noreferrer">http://i.stack.imgur.com/mCGRW.png</a></p>
  
  <ol start="2">
  <li>Scrolling horizontally is a pain. It only works on maybe 1/4 height from top of the scrollview area and very difficult to scroll. How do i layout subviews so that this scrollview is properly scrollable?</li>
  </ol>
  
  <p>Note: I am explicitly setting content size of size scrollview to more than required so that i can see the scrolling. </p>