iCarousel
iCarousel copied to clipboard
iCarousel dissapears in IOS 11
With an iCarousel object in my ViewController, the carousel dissappears when presenting an UIAlertController (UIAlertControllerStyleActionSheet) or UIPopoverController. The function reloadData has to be called to get it back.
Any idea how this can be solved?
Nobody?
@JeeGee1983 I'm also having this issue in one of the older apps I support. Have you found a workaround? I only see this issue on iOS 11.
@Zbeyer, unfortunately not. I’m reloading the carousel every time after dismissing the UIAlertController or PopoverController. Not I nice solution because when doing this, the items flash.
I have send an email to Charcoal Design to ask if they have any idea where to look for a solution.
Yeah, that's not something that will work for me. :|
@Zbeyer, found a solution already?
I'm also having this issue. With an iCarousel object in tableViewCell, the carousel dissappears when cell recycled
@JeeGee1983 I ended up doing something similar. Had to re-write instances where popovers are generated and in the constructors and deconstructors raise events using NSNotificationCenter
that trigger iCarousel to redraw.
Like @JeeGee1983, now the items flash whenever a popover is opened or dismissed, however the users are now able to access their content. To my knowledge this is the only working solution anyone has come up with, correct?
- (void)viewWillAppear:(BOOL)animated {
...
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(reloadCarousel) name:kPopoverReDrawNotification object:nil];
}
- (void)reloadCarousel {
//iOS 11 introduced break in iCarousel when a popover appears or disappears. The only known workaround is the force iCarousel to redraw as part of the popover
[self.carousel reloadData];
}
Where possible, I used existing delegate methods to post the notification:
#pragma mark - PopoverDelegate
- (void) popoverControllerDidDismissPopover:(UIPopoverController *)popoverController {
[[NSNotificationCenter defaultCenter] postNotificationName:kPopoverReDrawNotification object:nil];
}
Hi, I m planning to integrate this iCarousel. Does this issue remain? Any fixes about the items flash behaviour?
My solution is creating a new window, put this window above current window, and set UIAlertController to the root view controller of this window. After some debugging, I found the reason why the carousel disappear is that after presenting a view controller, system implicitly clears all the animations attached to the views below. Carousel just layouts its sub views by animations! If anyone still get stuck by this issue, can ask me for some sample codes.