臭虫的UITableView(deleteSections:withRowAnimation:)? [英] Bug in UITableView ( deleteSections:withRowAnimation: )?
问题描述
我在使用本<一个问题href=\"http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITableView_Class/Reference/Reference.html#//apple_ref/occ/instm/UITableView/deleteSections%3awithRowAnimation%3a\">UITableView方法:
- (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation
首先,文件说:
动画:
YES动画部分的删除,否则没有。
animation: YES to animate the deletion of sections, otherwise NO.
但参数动画实际上是枚举类型 UITableViewRowAnimation
,而不是 BOOL
!?
But the parameter animation is actually of type enum UITableViewRowAnimation
, not BOOL
!?
那么我怎么才能禁用动画?我试过 NO
和 UITableViewRowAnimationNone
。没有什么作品。本节缺失始终是动画。
So how can I disable the animation? I've tried NO
and UITableViewRowAnimationNone
. Nothing works. The section deletion is always animated.
我知道,我可以使用 [的tableView reloadData]
来代替。这将解决我的问题。我只是好奇,如果这是一个已知的问题,是否有可能与此实现代码如下方法来禁用动画。
I know that I can use [tableView reloadData]
instead. That would solve my issue. I'm just curious if that is a known problem and if it is possible to disable animation with this tableview method.
谢谢!
推荐答案
关于YES / NO在doc,而参数的类型UITableViewRowAnimation的,我想这是从旧的版本,其中的参数是API的休息一个BOOL之前。无论如何,文件确实是错了。
About the YES/NO in the doc whereas the parameter is of type UITableViewRowAnimation, I guess this is a rest from an old version of the API where the parameter was a BOOL before. Anyway, the documentation is indeed wrong.
不要犹豫,反馈发送给Apple这个(使用这是很好的,但是......在文档的底部链接)
Don't hesitate to send a feedback to Apple for this (using the "It's good but…" link at the bottom of the doc)
这篇关于臭虫的UITableView(deleteSections:withRowAnimation:)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!