title: iOS 11 Safe Area when multiple UITableViews in UIScrollView
body: <p>In my app I have a screen where I use a UIScrollView containing a UIStackView and multiple UITableViews to horizontally scroll through different kinds of content.</p>
  
  <p>I have a problem with the iPhone X where the first tableviews left side and the last tableviews right side are inset correctly to give room for the iPhone X safe area. However, the right side of the first tableview, the left side of the last tableview and both sides of all tableviews in between are not correctly inset. </p>
  
  <p>Question: What is the correct way to apply the inset to both sides of each tableview? </p>
  
  <p><a href="https://i.stack.imgur.com/gZClN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gZClN.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/nbgp8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nbgp8.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/0ZHQS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0ZHQS.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/oulHc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oulHc.png" alt="enter image description here"></a></p>
  
  <p><strong>Update 1</strong></p>
  
  <p>While at the first look, the solution suggested by Sh_Khan (using leading/trailing constraints to the safe area on the container UIScrollView) looks quiet good, it is not actually what I would like to achieve. As you can see, the cell separators are not going all the way to the edge of the screen and when scrolling from one tableview to the next, the white bars where the safe area is are clearly visible. </p>
  
  <p>I need to somehow inset the tableviews cell content views just like the system does it but I'd need to do it for every tableviews cell. Does anybody know how the system actually achieves this?  </p>
  
  <p><a href="https://i.stack.imgur.com/SI4G2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SI4G2.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/YJdMu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YJdMu.png" alt="enter image description here"></a></p>