Closed frranck closed 8 years ago
I don't observe that on the puppy selector though..
Found a "hack" to go around that problem by using .tag of UIView as index... Still now clue where it's coming from.
Is that behavior in our examples as well?
No it's not, and I couldn't figure out what difference makes it bug in my code.
Could you try to reproduce the bug using the settings of a carousel you have in your project? Maybe that way we can try to find the issue. For now I'm ¯(ツ)/¯
Ok I figured out: the problem is that I create the carousel with:
carousel = SwiftCarousel(frame: carouselFrame, items: [UIView()])
and then I set the corrects views. If I create it with
carousel = SwiftCarousel(frame: carouselFrame)
I don't have this problem.
Perfect! Yeah, you don't need to specify your items in init, you can do it later. Thanks for resolving the issue! 🎉
I have this weird behaviour: the selected item returns the item to the left, and not the one in the middle of the screen. I'm using .resizeType = .FloatWithSpacing(10.0) and 1 item per screen. Anyone noticed this ?