我想從UitableViewController類訪問自定義UiTableViewCell(子類UITableViewCell)上的標籤屬性。例如我有heightForRowAtIndexPath方法,我需要訪問標籤。如何從UiTableViewController訪問自定義UITableViewCell上的屬性?
這裏是我的代碼:
- (CGFloat)tableView:(UITableView *)tv heightForRowAtIndexPath:(NSIndexPath *)indexPath {
// I need access to the custom UITableView Cell property here
}
任何提示嗎?此外,它甚至可以在uiviewcontroller中聲明插座並將其鏈接到自定義uitableviewcell上的標籤?
感謝
但是,這是怎麼給你在'tableView:heightForRowAtIndexPath:'方法中的單元格?這將需要從單元訪問標籤。 – rmaddy
我已經更新了我對一些可能有助於從heightForRowAtIndexPath訪問的鏈接的答案:method – user427969