Vincenzo
Vincenzo

Reputation: 1158

UIScrollView paging add space between pages

I am using a UIScrollView with paging = true to display multiple UIViewControllers. That works fine. Now I am trying to add a space between the pages by following this answer How to create a paging scrollView with space between views

However it does not work for me. When the UIScrollView stops scrolling the space (black) remains visible. I am using Swift 2 syntax and iOS 9.

view1 view2 enter image description here

Upvotes: 2

Views: 1876

Answers (1)

Tim
Tim

Reputation: 583

I had the same problem, turns out I had an equal widths constraint stopping it paging at the right distance. See my post here: Margin between images in UIScrollView - Swift version

Upvotes: 1

Related Questions