Mavericks issue: noteHeightOfRowsWithIndexesChanged: does not animate

旧时模样 提交于 2020-01-03 03:23:17

问题


When calling [myTableView noteHeightOfRowsWithIndexesChanged: myIndexSet] inside an NSAnimationContext group, the height of the rows animates on 10.8, but does not animate on 10.9: it jumps instantaneously to the final height instead.

After some experimentation, I found that it does animate on 10.9 if you do not place that call to the table view in an NSAnimationContext group.

This result is a bummer because I wanted to have other animations on the rows in sync with the height animation from the table view. Any ideas?


回答1:


You might try setAllowsImplicitAnimations: YES

For performance or legacy reasons some AppKit interface objects might not set that as a default. The tricky part is that bit about inheritance. Many things have important parts that are inherited but not always documented clearly in the immediate object docs. This is where some things are in AppKit release notes or only in WWDC videos.



来源:https://stackoverflow.com/questions/20924141/mavericks-issue-noteheightofrowswithindexeschanged-does-not-animate

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!