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.
(CGFloat)carousel:(iCarousel )carousel valueForOption:(iCarouselOption)option withDefault:(CGFloat)value
{
switch (option)
{
case iCarouselOptionCount:
{
if (carousel != mainCarousel)
{
// Dynamically set the count so that more items show in portrait mode.
return (int)( self.mainCarousel.bounds.size.height / (CAROUSEL_ITEM_COUNT_RATIO CAROUSEL_ITEM_WIDTH_SUB) );
}
return value;
}
...
}
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.