Contents

Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 5802 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
여러개의 특정 row만 reload 하는 코드
// tableView에 특정 row만 reload 하겠다고 메세지 전달
[tableView beginUpdates];

// reload 하기 위한 indexPath 배열 생성
NSIndexPath *indexPath1 = [NSIndexPath indexPathForRow:1 inSection:0];
NSIndexPath *indexPath2 = [NSIndexPath indexPathForRow:3 inSection:0];

NSArray *array = [NSArray arrayWithObjects:indexPath1, indexPath2, nil];

// 특정 row를 reload
[tableView reloadRowsAtIndexPaths:array
    withRowAnimation:UITableViewRowAnimationFade];

// tableView에 reload 완료 메세지 전달
[tableView endUpdates];



한 개의 특정 row 만을 reload 하는 심플한 코드

[_tableView beginUpdates];

[_tableView reloadRowsAtIndexPaths:@[indexPath]
    withRowAnimation:UITableViewRowAnimationTop];

[_tableView endUpdates];


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
769 Develop [c] 프로그래밍 ppt, 스킬업 (비트 수업자료) file hooni 2003.04.23 9455
768 Develop [c] 프로그래밍 과제..(colprint) file hooni 2003.04.23 8516
767 Develop [c] 프로그래밍의 전반적인 설명 ppt file hooni 2003.04.23 9377
766 Develop [c] 프로그램 코드(c/c++)를 html 파일로 변환 file hooni 2013.04.23 8742
765 Develop [c] 프로세스 검사하기 hooni 2013.04.23 11663
764 Develop [c] 프로세스 정보 출력하기.. file hooni 2003.04.23 8851
763 Develop [c] 프로세스간의 통신(파이프) hooni 2003.04.23 7994
762 Develop [c] 플러드 필링 (flood filling) 알고리즘.. file hooni 2013.04.23 8571
761 Develop [c] 하노이탑 - 재귀함수 hooni 2003.04.23 10708
760 Develop [c] 학교 건물 최단거리 찾는 웹 연동 프로그램 file hooni 2013.04.23 8075
759 Develop [c] 학생명단 관리 프로그램 소스 ㅋㅋ 1 file hooni 2003.04.23 9085
758 Develop [c] 한글 문자열 출력 hooni 2015.11.10 3140
Board Pagination Prev 1 ... 30 31 32 33 34 35 36 37 38 39 ... 99 Next
/ 99