4

I want my CollectionView to still be able to scroll a bit up and down when there’s only a few cells (to get that bounce effect). In a previous question it was suggested that using

self.collectionview?.alwaysBounceVerticle = true 

would work (this was marked as the correct answer) but this doesn’t work anymore.

I’m using swift 3

Nolan Ranolin
  • 409
  • 3
  • 16

3 Answers3

6

After looking tying some stuff in the interface builder it turns out that you have to check the box for “Bounces” and “Bounces Vertically”

Nolan Ranolin
  • 409
  • 3
  • 16
5

You can configure it using Storyboard. Just select your collection view and in attribute inspector check * Bounces* and Bounce Vertically.

enter image description here

Vlad Khambir
  • 4,313
  • 1
  • 17
  • 25
  • Yeah I just saw I had that box checked but didn’t have the box for “Bounces” checked. So it only bounced when there was lots of cells – Nolan Ranolin Jun 11 '17 at 18:41
5
// swift
self.collectionview?.alwaysBounceVertical = true
self.collectionview?.bounces = true
Lucas Chwe
  • 2,578
  • 27
  • 17