cell高度自適應
CGSize label2Size = [[_dataDic objectForKey:@"skill"]
boundingRectWithSize:size options:(NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading) attributes:@{
NSFontAttributeName:[UIFont systemFontOfSize:14.0],
NSForegroundColorAttributeName:[UIColor blackColor]} context:nil].size;
CGRect frame = [string boundingRectWithSize:CGSizeMake(WIDTH - 15, CGFLOAT_MAX)
options:NSStringDrawingUsesLineFragmentOrigin attributes:
@{NSFontAttributeName:[UIFont systemFontOfSize:17]} context:nil];
cell單個象对、單段刷新
cell單個刷新
//一個section刷新
NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:2];
[tableview reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
//一個cell刷新
NSIndexPath *indexPath=[NSIndexPath indexPathForRow:3 inSection:0];
[tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者