tableview可以只刷新其中的某个section吗
可以只刷新tableview中的某个特定的section吗?
我现在弄了一个tableview里面有两个section 选中section中的某行时在该行后面打对勾, 我想让两个section在选择时互不影响
[解决办法]
重写reload,行吗?
[解决办法]
我觉得可以标记下哪个section
[解决办法]
刚开始学这玩意 呵呵 怎么标记呢?是记下所在的section吗 每次点击时都判断是否在同一section?
怎么重写reload啊?
[解决办法]
- (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
可以啊
[解决办法]
判断两个indexPath.section 和 indexPath.row
[解决办法]
- (void)beginUpdates; // allow multiple insert/delete of rows and sections to be animated simultaneously. Nestable
- (void)endUpdates; // only call insert/delete/reload calls or change the editing state inside an update block. otherwise things like row count, etc. may be invalid.
- (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation;
- (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation;
- (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
- (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
- (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation;
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
[解决办法]
单独设置个row 下拉
[解决办法]
我感觉还是这个方法可以实现
- (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);