Contents

Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 4834 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
217 Develop [js] get방식, url이후 모두 그대로 읽어오기.. hooni 2013.04.23 6860
216 Develop [vc++] 게임 소스 등.. ㅋㅋ file hooni 2013.04.23 18383
215 Develop [c] 격자 직사각형 넓이 구하기 file hooni 2013.04.23 7472
214 Develop [c] 최단거리 알고리즘 & 예제소스.. 13 file hooni 2013.04.23 10182
213 Develop [c] vc++ 에서 clrscr(), gotoxy() 함수 사용하기.. hooni 2013.04.23 14274
212 Develop [c] 오목.. 간단한 소스 ㅋㅋ file hooni 2013.04.23 9667
211 Develop [c] 오류체크(CRC 체크 ) 소스 2 hooni 2013.04.23 8132
210 Develop [c] 네트워크 정보 알아보기 file hooni 2013.04.23 16145
209 Develop [c] alarm()함수 설명과 간단한 예제 file hooni 2013.04.23 6700
208 Develop [c] selec()를 이용한 입출력 다중화 file hooni 2013.04.23 8269
207 Develop [c] 다중연결 서버 만들기 #4 - thread 사용 file hooni 2013.04.23 23742
206 Develop [c] 다중연결 서버 만들기 #3 - poll() 사용 file hooni 2013.04.23 6366
Board Pagination Prev 1 ... 48 49 50 51 52 53 54 55 56 57 ... 71 Next
/ 71