1
votes

I am currently using a master-detail iPad UI: inside a UISplitViewController I have the left (master) side contain a UITableViewController, and the right (detail) side contains an iCarousel. See attached image.

Problem: When scrolling the table view WHILE the carousel is still animating The table view scrolls and decelerates smoothly, and the iCarousel scrolls in a sluggish (that is, barely animating at all) fashion.

What can one do to improve the iCarousel's animation "smoothness" when animating in concurrence to a table view animating/decelerating?

enter image description here

Points for consideration:

  1. Tested on iPad 1 (non-retina), iPad 4G (retina), and in simulator retina and non retina, same results in all platforms.

  2. It does not seem to matter whether you first drag the carousel and then the table or in the other order, the table view always takes "precedence", and iCarousel's smooth animation performance seems to go *^&k!.

1
I have no idea about iCarousel, but it sounds like whatever drives its animation is scheduled in the "wrong" run loop mode. Set it to NSRunLoopCommonModes and it should work.JustSid
The control is a (wonderful!) cover flow-like controller named "iCarousel". It seems to animate using an 'NSTimer scheduledTimerWithTimeInterval:target:selector:userInfo:repeats', and it intermittently uses '[_timer invalidate]' also '[CATransaction setDisableActions:YES]' and '[CATransaction setDisableActions:NO]' no scheduling in any run loop mode / type seems to be used in the class.RabinDev

1 Answers

3
votes

The problem is that the timer that drives the animation, is scheduled in the default run loop mode, which means that the timer won't fire while you scroll in a UIScrollView (which the table view inherits from). To solve this problem, you have to modify the iCarousel code (line 1737, startAnimation). Add the following:

[[NSRunLoop currentRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];