사용자가 셀을 클릭 한 직후에 uitableviewcell의 사용자 정의 액세서리보기를 변경하려고합니다. 어떻게하면 좋을까요? 소스uitableviewcell에서 사용자 정의 액세서리보기 변경?
http://cocoawithlove.com/2009/04/easy-custom-uitableview-drawing.html
다운로드 링크 : 공식적으로
, 나는 매트 갤러거 '사용자 정의 테이블보기 자습서를 사용하고 http://projectswithlove.com/projects/EasyCustomTable.zip편집
이 코드를 시도 , 터치 업 후 액세서리를 변경합니다. 또한 같은 결과를 가진 willSelectRowAtIndexPath를 시도했습니다. 셀의 배경 화상을 해결
- (NSIndexPath *)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UIImage *indicatorImage = [UIImage imageNamed:@"indicatorSelected.png"];
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
cell.accessoryView = [[[UIImageView alloc] initWithImage:indicatorImage] autorelease];
return indexPath;
}
EDIT
문제는 보조 장비를 포함한다.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
cell.accessoryView = newView;
}
을이 그냥 다음 선택한 현재 셀을 잡고 및 변경 : 그래서 액세서리는
가
없음 아주 나를 위해 작동하지 : – cannyboy