0
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"LibraryListingCell";
InSeasonCell *cell = (InSeasonCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"InSeasonCellView" owner:self options:nil];
cell = [_cell autorelease];
_cell = nil;
}
if(_dataController!=NULL){
Product *productAtIndex = [_dataController objectInListAtIndex:indexPath.row];
// Configure the cell...
if (productAtIndex.name != nil && productAtIndex.week != nil && productAtIndex.image != nil) {
cell.name.text = productAtIndex.name;
cell.week.text = productAtIndex.week;
cell.image.image = productAtIndex.image;
}
}
return cell;
}
메시지 오류 cell.name.text의 cell.week.text의 cell.image.text합니다. 확실히 그것은 메모리 관리 오류입니다. 나는 최선을 다해 적절히 유지하고 배포했다. 응용 프로그램이 실행될 때 충돌이 발생하고 때로는 모든 것이 제대로로드되지만 스크롤하면 충돌이 발생합니다. 메모리 관리에 대한 도움이나 조언을 주시면 감사하겠습니다. 대신이의아이폰 OS : lldb EXC_BAD_ACCESS 사용자 정의 셀
_cell 사용자 지정있는 UITableViewCell은 내가 함께 IBOutlet로 액세스 할 수 있습니다. Idon't는 내가 IBOutlet를 해제해야하거나, 1를 할당해야한다라고 생각한다. IBOutlet을 공개하지 않고 사용하려고합니다. – wwjdm
이 자습서는 http://www.iphonedevcentral.com/customize-that-uiviewcell-part-1-using-interface-builder/에서 사용했습니다. – wwjdm
사용자 지정 셀 .h .m 및 xib 파일이 있습니다. 어떻게 새로운 UITableViewCell을 만들지 않고 (사용자 정의 xib)로드할까요 – wwjdm