Is there a delegate protocol that includes a callback for the end of animated changes to UITableView? Particularly reloadSection/Rows?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- Disable Browser onUnload on certain links?
- how do you prevent page scroll in textarea on mobi
相关文章
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How to create a CFuncType in Python
- Popover segue to static cell UITableView causes co
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- TransitionFromView removes previous view
Actually, there DOES seem to be a way to do this (though not nearly as straightforward as it ought to be!).
While there's no direct access to some kind of callback, it appears that
UITableView
animations take place within aCAAnimation
. Therefore, simply accessing thecompletionBlock
of theCAAnimation
seems to give you what you want.Here's how I got 2 animations to chain in my
UITableView
subclass:The code in the
collapseSection:
andexpandingSection:
methods simply adds/removes sub-sections that need to be collapsed or expanded. The key point here, though, is that, when using this code, I am finally able to collapse one sub-section THEN expand the next sub-section. Before, both animations were occurring concurrently, which was visually unappealing.I hope this helps you! I struggled through this for a long time, banging my head against the wall until I found this.
This is written against iOS 6.0. I also really hope that some future version makes this workaround/hack obsolete!
It's not the answer you want to hear but no* :(
The table view's delegate will respond to these methods only.
However, (it's a bit of a hack but) animations are about 0.35 seconds long do you could just call performSelector:withObject:afterdelay: . . .
*at least not as far as I know . . .