-2
하나의 UITableview 및 UICutsom 셀이 있습니다. 해당 UITableview 웹 서비스를 사용하여 데이터를 채 웁니다. 셀의 배경색과 글꼴 색을 바꿉니다. 해당 Tableview 셀 배경색 및 레이블 색을 위아래로 스크롤하면 다른 셀에서도 변경됩니다.UITableview에서 UIScrollView 관련 문제가 발생했습니다.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *simpleTableIdentifier = @"FieldInventoryCell";
// UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
FieldInventoryCell *cell=(FieldInventoryCell *)[tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
if (cell == nil) {
NSArray *nib=[[NSBundle mainBundle] loadNibNamed:@"FieldInventoryCell" owner:self options:nil];
cell=[nib objectAtIndex:0];
}
NSArray *ar = [[arr objectAtIndex:indexPath.row]componentsSeparatedByString:@"|"];
cell.Status.text=[ar objectAtIndex:1];
cell.serialnumber.text=[ar objectAtIndex:0];
cell.date.text=[ar objectAtIndex:2];
if([cell.serialnumber.text isEqualToString:@"Grand Total"])
{
cell.contentView.backgroundColor=[UIColor blueColor];
cell.serialnumber.textColor=[UIColor whiteColor];
}
if ([cell.serialnumber.text isEqualToString:@"INV_FLD Status Total"])
{
//cell.contentView.backgroundColor=[UIColor blueColor];
cell.serialnumber.textColor=[UIColor orangeColor];
}
return cell;
}
실제 문제가 무엇인지 설명하지 않았거나 강조 표시했을 수 있습니다. 어떤 문제에 직면 해 있습니까? 무엇을 고치려고 했습니까? –