0
헤이 사람들이 테이블 뷰에 문자열 배열을로드하는 데 문제가 있습니다. 이미 수행 한 작업은 정보를 구문 분석하고 statues1이라는 요소의 mutablearray에 필요한 데이터를 저장했습니다. 할 일은 lues를 사용자 정의하여 테이블 뷰에 statues1을로드하는 것입니다. 사용자가 모든 값을 볼 수 있습니다. 이제는 테이블 뷰를로드 할 때 테이블 뷰를로드 할 때 오류가 발생합니다. "BAD EXCESS", 도와주세요. 이?가변 배열에서 테이블 뷰로드
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
int counter=indexPath.row;
NSString *CellIdentifier = [NSString stringWithFormat:@"%d",counter];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.selectionStyle=UITableViewCellSelectionStyleNone;
UIImageView *imgViewBack=[[UIImageView alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 100.0)];
imgViewBack.image=[UIImage imageNamed:@"black-_image.png"];
[cell.contentView addSubview:imgViewBack];
if(statuses1)
{
UILabel *lblTitle=[[UILabel alloc] initWithFrame:CGRectMake(100.0, 10.0, 200.0, 20.0)];
lblTitle.text=[statuses1 objectAtIndex:indexPath.row];
[cell.contentView addSubview:lblTitle];
[lblTitle release];
}
//[cell.contentView addSubview:btnRowButton];
}
return cell;
}
'lblTitle'의 OP의'release'는 그가'alloc/init '. –
하지만 테이블 뷰에서 여러 개의 lables를 표시해야하므로 사용자 정의해야합니다. 위 결과를 적용하면 "BAD EXCESS" –
@ Jacob, 맞습니다. @Prash, 추적을 보셨습니까? (그것은 응용 프로그램이 실행 중일 때 Shift-Command-Y입니다) –