Contents

Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 5792 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
219 Develop [js] 툴팁.. 좋은거.. (tooltip) file hooni 2013.04.23 8175
218 Develop [web] URL 인코딩 방법.. 테이블.. ㅋㅋ hooni 2013.04.23 16141
217 Develop [js] get방식, url이후 모두 그대로 읽어오기.. hooni 2013.04.23 7981
216 Develop [vc++] 게임 소스 등.. ㅋㅋ file hooni 2013.04.23 19103
215 Develop [c] 격자 직사각형 넓이 구하기 file hooni 2013.04.23 8686
214 Develop [c] 최단거리 알고리즘 & 예제소스.. 13 file hooni 2013.04.23 12298
213 Develop [c] vc++ 에서 clrscr(), gotoxy() 함수 사용하기.. hooni 2013.04.23 15247
212 Develop [c] 오목.. 간단한 소스 ㅋㅋ file hooni 2013.04.23 10763
211 Develop [c] 오류체크(CRC 체크 ) 소스 2 hooni 2013.04.23 9860
210 Develop [c] 네트워크 정보 알아보기 file hooni 2013.04.23 16970
209 Develop [c] alarm()함수 설명과 간단한 예제 file hooni 2013.04.23 7555
208 Develop [c] selec()를 이용한 입출력 다중화 file hooni 2013.04.23 9295
Board Pagination Prev 1 ... 48 49 50 51 52 53 54 55 56 57 ... 71 Next
/ 71