Closed MartijnSchoemaker closed 6 years ago
Thanks @MartijnSchoemaker, I'll look in to this as soon as I can
I ran into this issue as well. I tracked the issue to this line in ScalingCarouselCell:
let originX = superview.convert(frame, to: nil).origin.x
Passing nil causes the value to be based on the window, but the window offset changes during a push. As an experiment I changed it to this and it worked for my particular case:
let originX = superview.convert(frame, to: superview.superview).origin.x
I think the full solution would be to find whatever view is the superview of the ScalingCarouselView and use it as the reference.
Also, THANK YOU for leaving your classes open.
Thanks @MartijnSchoemaker and @matheda, I just published v2.0.3. Issue should be resolved. Closing this.
I found a bug that the third visible cell is too big when pushing a new view controller. Pushing a new viewcontroller results in calling 'didScroll' which effects in wrong calculation; percentScaling is 2. (where it should be 0 or 1). When coming back on the viewcontroller with ScalingCarousel on it, the third cell has wrong size.
I'm not familiar enough with the code to find a solid solution but for now I did this change locally in ScalingCarouselCell.swift:
Maybe you could fix this with a more solid solution?