我想擴大一個UITableViewCell具有這種功能,從didSelectRowAtIndexPath方法調用:崩潰的UITableViewCell在第二次點擊
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if(selectedCellIndexPath != nil &&
[selectedCellIndexPath compare:indexPath] == NSOrderedSame)
return 128;
return 43;
}
點擊一個細胞擴展它,點擊另一個單元坍塌到老,並擴大新的細胞。到現在爲止還挺好。但是我也想在單擊擴展單元時摺疊單元格,但不知道如何?
作爲獎勵:顯示未展開單元格的內容,與下面的單元格重疊。如何防止顯示應按摺疊單元格大小裁剪的內容?
你試過cell.contentView.clipsToBounds = YES? – thelaws