사람들이 setSelected : animated :은 시뮬레이터에서도 iPhone 및 iPad에서 다르게 작동합니다.iPhone 및 iPad에서 UITableViewCell이 다르게 작동합니다.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell* cell = [tableView cellForRowAtIndexPath:indexPath];
if (cell.accessoryType == UITableViewCellAccessoryNone) {
//[cell setSelected:NO animated:YES]; works only on iPhone, but not on iPad
[tableView deselectRowAtIndexPath:indexPath animated:YES]; //works everywhere
return;
}
[self.navigationController pushViewController:someViewController animated:YES];
}
가이 줄을 표시아무도 하는 setSelected에 대한 몇 가지 정보를 제공 할 수 있는지 궁금 아이폰
[cell setSelected:NO animated:YES];
에서만 작동 : 애니메이션 : 방법의 제한 아래의 코드를 살펴 보자 ?
흠, 재미 있습니다. 'setHighlighted : animated :'와 같은 일이 발생합니까? –
iPad에서 작동하지 않는다고 말하는 것이 무엇을 의미합니까? 그것이 iPad에서 호출 될 때 어떤 행동을 보입니까? – Greg
탭을 눌렀을 때 셀을 강조 표시하는 기본 동작을 억제하려는 경우 Interface Builder에서 "터치시 선택 표시"를 선택 취소 할 수 있습니다. –