//根据指定的indexpath获取该cell上的属性
NSIndexPath*indexPath = [NSIndexPathindexPathForRow:1inSection:0];
MineTableViewCell*sectionCell = [myTableViewcellForRowAtIndexPath:indexPath];
sectionCell.unitLabel.text=_defultUnit;
获取view所在的cell 的indexpath
- (NSIndexPath*)currentCellIndexPath:(UIView*)view
{
UIView* obj = view;
while(![objisKindOfClass:[MessageCellclass]]) {
obj = obj.superview;
}
MessageCell* cell = (MessageCell*)obj;
NSIndexPath* indexPath = [myTableViewindexPathForCell:cell];
returnindexPath;
}
网友评论