Compare commits

...
2 Commits
Author SHA1 Message Date
Alex 25d94360e1 Merge pull request #21 from imaccallum/master
Fixed indefinite cell growth
2016-06-16 06:01:58 +00:00
Ian MacCallum b0e7cc7f0c Fixed indefinite cell growth 2016-06-15 23:01:24 -04:00
@@ -182,13 +182,18 @@ extension BasePageCollectionCell {
return shadow
}
func configurationCell() {
frame.size.height += (superview?.frame.size.height)!
frame.origin.y -= (superview?.frame.size.height)! / 2
frame.origin.x -= yOffset / 2
frame.size.width += yOffset
}
func configurationCell() {
// Prevents indefinite growing of the cell issue
let i: CGFloat = self.isOpened ? 1 : -1
let superHeight = superview?.frame.size.height ?? 0
frame.size.height += i * superHeight
frame.origin.y -= i * superHeight / 2
frame.origin.x -= i * yOffset / 2
frame.size.width += i * yOffset
}
func configureCellViewConstraintsWithSize(size: CGSize) {
guard isOpened == false && frontContainerView.getConstraint(.Width)?.constant != size.width else { return }