나는 UITableViewCells
의 숫자로 구성된 UITableView
을 가지고 있습니다. didSelectRowAtIndex에서 맞춤 UITableViewCell의 속성을 업데이트하는 방법은 무엇입니까?
indexPath.row
2 같으면 테이블 didSelectRowAtIndexPath
있어서 발광은, I이 행의 셀 내에 UILabel
를 업데이트 할
제 생각에는 다음 줄을 따라 뭔가를 사용하는 것이 었습니다. 여기
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if(indexPath.row == 2){
myCustomCellView *cell = [self.essentialsTableView cellForRowAtIndexPath:indexPath];
cell.myUILabel.text = @"my text";
[tableView reloadData];
}
}
문제는 cellForRowAtIndexPath
유형 UITableViewCell
하지 myCustomCellView
의 객체를 반환합니다.
아무도 내가 didSelectRowAtIndexPath
메서드 내에서 셀의 속성을 액세스하고 업데이트 할 수 있다고 조언 할 수 있습니까?
@Scratcha로 시작하지 않는 당신이 다음 대답을 받아 upvote 대답 유용합니다 :) –