문제가 발생했습니다. XML 파일에서 데이터를 가져 왔으며이 정보로 행을 채 웁니다. ... 인덱스 0과 인덱스 1의 행을 동일한 데이터 청크를 참조하도록합니다. 대신 행 0은 XML 파일의 청크 0에서 항목을 읽고 행 1은 XML 파일의 청크 1에서 읽습니다. , 난 그냥 내 행을 더 크게 만들 수 있고 더 큰 행 안에 필요한 모든 것들을 포함 할 수 있지만 이것을 프로그램 적으로 할 수있는 방법이 있습니까?동일한 xml 데이터 청크에서 2 행을 읽습니다.
이미지 : 내 행이 xml 파일 의미에서 읽을 때 일어나는 무슨
빨간 선은 녹색 내가 달성하고자하는 것입니다. 제안?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"LiveIdent";
LiveViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
LiveMatchObject *item = [_tableDataLiveMatch objectAtIndex:[indexPath row]];
if ([item isKindOfClass:[LiveMatchObject class]]) {
cell.cellHomeTeamName.text = item.homeName;
cell.cellAwayTeamName.text = item.awayName;
cell.cellHomeTeam.image = item.homeTeamLogo;
cell.cellAwayTeam.image = item.awayTeamLogo;
cell.cellHomeTeamScore.text = item.homeGoals;
cell.cellAwayTeamScore.text = item.awayGoals;
cell.cellDate.text = item.matchDate;
cell.cellMatchStatus.text = item.matchMinute;
if ([item.matchMinute isEqual: @"Finished"]) {
cell.cellMatchStatus.text = @"Terminado";
cell.cellMatchStatusImage.image =[UIImage imageNamed:@"Finished"];
}
else if ([item.matchMinute isEqual: @"Postponed"]){
cell.cellMatchStatus.text = @"Por Iniciar";
cell.cellMatchStatusImage.image =[UIImage imageNamed:@"Waiting"];
}
else {
cell.cellMatchStatus.text = item.matchMinute;
cell.cellMatchStatusImage.image =[UIImage imageNamed:@"Live"];
}
}
else {
}
if (indexPath.row % 2) {
cell.backgroundColor = [[UIColor alloc]initWithRed:255.0/255.0 green:255.0/255.0 blue:255.0/255.0 alpha:1];
cell.cellDate.hidden = YES;
cell.cellMatchStatusImage.hidden = YES;
cell.cellMatchStatus.hidden = YES;
} else {
cell.backgroundColor = [[UIColor alloc]initWithRed:235.0/255.0 green:235.0/255.0 blue:235.0/255.0 alpha:1];
cell.cellHomeTeamName.hidden = YES;
cell.cellHomeTeamScore.hidden = YES;
cell.cellHomeTeam.hidden = YES;
cell.cellAwayTeamName.hidden = YES;
cell.cellAwayTeam.hidden = YES;
cell.cellAwayTeamScore.hidden = YES;
cell.cellScoreDash.hidden = YES;
cell.accessoryType = UITableViewCellAccessoryNone;
cell.userInteractionEnabled = NO;
}
모달 정의 내에서 원하는 코드를 넣으려고했지만 전혀 문제가 해결되지 않았습니다.
아름다운 ... 그 쉬운 ... 내 아기 plz, 타이 :) – user3271300