0
내 앱에 PrototypeCells (CustomCells)가있는 TableView가 있습니다. 4 개의 섹션이 있으며 각 섹션에는 하나의 행만 있습니다. 처음 세 개의 셀은 동일하며 모두 UITextField (tradeTextField)를 가지고 있습니다. 그러나 네 번째 셀 (Class ResultCell)에는 중간에 사용자 지정 레이블이 있습니다. InterfaceBuilder에서 Prototype Cell의 수를 2로하고 기본 클래스를 ResultCell로 변경하고 식별자를 resultCell로 변경했습니다. 그리고 지금은이 클래스는 키 tradeTextField에 대한 키 값 코딩을 지원하지 않습니다
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.section == 3) //Here i'm getting the error
{
ResultCell *cell = [tableView dequeueReusableCellWithIdentifier:@"resultCell" forIndexPath:indexPath];
cell.resultLabel.text = @"Test";
return cell;
}
else
{
TradeCell *cell = [tableView dequeueReusableCellWithIdentifier:@"tradeCell" forIndexPath:indexPath];
return cell;
}
}
사람이 제발 도와 드릴 방법의 cellForRowAtIndexPath 오류 여기
this class is not key value coding-compliant for the key tradeTextField.'
입니다 받고 있어요?
DataSource가 Content 용 ResultCell에 요청하면 응용 프로그램이 충돌합니다. ResultCell은 중간에 UILabel을 포함하고 있으며이 IBOutlet은 코드에 올바르게 연결되어 있습니다. 나는 그것을 검사했다. 이 셀을 삭제하면 앱이 실행되고 다른 셀이 올바르게 표시됩니다. – user1895268
오류 메시지 : 나는 TextField를 만들고 싶지만 셀은 가지고 있지 않습니다. 그리고 이것은 정확합니다. 하지만 다른 cellIdentifier를 지정했는데 컴파일러가 해당 셀을 인식하지 못합니다 – user1895268
clean & build를 시도해 보셨습니까? –