내가보기에이 jQuery과에 봉착하고 난 단지 2 테이블 행 5 행 7스크롤 한 후 iOS UITableView 셀이 잘못로드됩니까?
에서 아슬하게 2 테이블을 스크롤 한 UITableViewCellAccessoryDisclosureIndicator을 추가 (행 1 사라지는) 다음 맨 위로 이동 (어느 행 1이 나타나는지), 행 1에는 이제 UITableViewCellAccessoryDisclosureIndicator가 있습니다! 행 1은 어떻게 든 행 5 또는 행 7이 되었습니까 ??? 아래는 cellForRowAtIndexPath 코드입니다.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
}
cell.textLabel.textColor = [UIColor blueColor];
cell.detailTextLabel.textColor = [UIColor blackColor];
if (tableView == table1)
{
cell.textLabel.text = [title1 objectAtIndex:indexPath.row];
cell.detailTextLabel.text = [list1 objectAtIndex:indexPath.row];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
else if (tableView == table2)
{
cell.textLabel.text = [title2 objectAtIndex:indexPath.row];
cell.detailTextLabel.text = [list2 objectAtIndex:indexPath.row];
if (indexPath.row == 5 || indexPath.row == 7)
{
cell.selectionStyle = UITableViewCellSelectionStyleBlue;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
}
else
{
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
}
return cell;
}
고마워요!
그래서 당신이 서로 아래에 바로 위의 1 개보기 2 tableViews, /? 그렇다면 왜? – WrightsCS
왜냐하면 나는 2 개의 테이블이 다른 너비를 갖기를 원합니다. 그렇지 않으면 2 개의 섹션이있는 1 개의 테이블을 사용할 것입니다. 다른 방법을 추천 해 주시겠습니까? 감사! – iceholder