nicklockwood / iCarousel

A simple, highly customisable, data-driven 3D carousel for iOS and Mac OS
http://www.charcoaldesign.co.uk/source/cocoa#icarousel
Other
12k stars 2.58k forks source link

[ASK] animate view inside carousel cell with autoscroll #850

Open supermnemonic opened 6 years ago

supermnemonic commented 6 years ago

i added a subview to the cell. and i want to animate that subview while scrolling.

i set wrap and autoscroll to infinite automatic scrolling.

i tried set transition.startProgress = 0 transition.endProgress = 1.0 transition.type = "flip" transition.subtype = "fromRight" transition.duration = 1 transition.repeatCount = 1000 subview.layer.add(transition, forKey: "transition")

inside func carousel(_ carousel: iCarousel, viewForItemAt index: Int, reusing view: UIView?) -> UIView

but not work. any help?

https://stackoverflow.com/q/49297688/2537616