您好,欢迎来到二三四教育网。
搜索
您的当前位置:首页tableviewcell的属性、方法、刷新

tableviewcell的属性、方法、刷新

来源:二三四教育网
cell的添加属性,都应该加在 contentView  的属性上
如:
[self.contentView addSubview: self.label];

// 获取可以见到的 cell,让图片在cell坐标改变的时候偏移
 NSArray *array = [self.tableView visibleCells];

//刷新某一section
[self.tableview reloadSections:[NSIndexSet indexSetWithIndex:sender.tag - 100] withRowAnimation:UITableViewRowAnimationFade];
  

//一个cell刷新    
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];    
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];  

类别:
UITableViewStyleGrouped 时,section不会跟着移动
UITableViewStylePlain(默认) 时,section会跟着移动

Copyright © 2019- how234.cn 版权所有 赣ICP备2023008801号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务