Skip to content

Commit

Permalink
Merge pull request #2 from superpeteblaze/psmith/v1.0.1
Browse files Browse the repository at this point in the history
Correct content height
  • Loading branch information
aataraxiaa authored Jan 3, 2017
2 parents df7816c + dc44eae commit f36c02a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ScalingCarousel/Classes/ScalingCarouselView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ open class ScalingCarouselView: UICollectionView {
}

// Set the invisibleScrollView contentSize width based on number of items
invisibleScrollView.contentSize.width = invisibleScrollView.frame.width * CGFloat(numberItems)
let contentWidth = invisibleScrollView.frame.width * CGFloat(numberItems)
invisibleScrollView.contentSize = CGSize(width: contentWidth, height: invisibleScrollView.frame.height)
}
}

Expand Down Expand Up @@ -108,6 +109,8 @@ open class ScalingCarouselView: UICollectionView {
invisibleScrollView.isPagingEnabled = true
invisibleScrollView.showsHorizontalScrollIndicator = false


print("Frame size: \(frame.size)")
invisibleScrollView.contentSize = frame.size

// Turn off interaction on the overlay so touch events fall through to the main scroll view
Expand Down

0 comments on commit f36c02a

Please sign in to comment.