我看到这用了很多,但我不知道它做了什么。“动画”意味着什么和/或用于什么?
animated:YES
或
animated:NO
例如,在viewDidLoad方法中,我可能有这样的代码
self.tableView.allowsSelectionDuringEditing = YES;
,并在viewWillAppear中我可能有这样的代码
// some code here, and/or acondition is met, therefore put the tableview in editing mode
[self setEditing:YES animated:NO];
所以再次,什么是animated:NO
是什么意思? animated:NO
和animated:YES
有何区别?我在应用程序中看不到可见和/或功能差异。
很好的答案,谢谢你的详细解释! PS - 想到两个问题,即.25秒可调?而且,这与'UITableViewRowAnimationFade'有什么关系?只是想知道...... – ElasticThoughts 2012-02-14 03:55:11
你可以使用'+ [CATransaction setAnimationDuration:]'或'+ [UIView animateWithDuration:animations:]'来改变0.25秒,但我没有尝试过。你可以在'deleteRowsAtIndexPaths:withRowAnimation:'这样的消息中使用'UITableViewRowAnimationFade'常量作为'animation'参数。 – 2012-02-14 05:37:26
再次感谢罗伯! – ElasticThoughts 2012-02-14 19:05:30