nicklockwood / iCarousel

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

Nested Carousel ValueForOption not getting called #862

Open Raviron opened 6 years ago

Raviron commented 6 years ago

Hello,

I'm using nested carousels in a popup window (iPad). The popup window size changes when the iPad orientation changes, so I change the number of visible items dynamically to suit the popup height, see below. However, the procedure does not get called after an orientation change and redraw. (If you manually swipe or interact with the iCarousel it does get called and redraws properly.) End result is that the component looks pretty silly after an orientation change. Manually calling a redraw or reload does not work as all of the iOS messages regarding orientation changes are fired BEFORE the new popup view sizes are available (e.g. UIDeviceOrientationDidChangeNotification), so those redraws are based on the old popup dimensions. I've got an extremely ugly workaround that fires a redraw on a short timer after orientation change, but is it possible to get this issue fixed?

Thanks, Nelson

// Update visible item count.