Contents

Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 4843 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
637 Develop [ios] Objective-C 프로퍼티의 ATOMIC / NONATOMIC 속성 hooni 2014.03.17 3049
636 Develop [ios] UDID 사용 제한에 따른 대안들 hooni 2014.03.13 4020
635 Develop [ios] URL Scheme 이용하여 앱 설치 확인 hooni 2014.03.10 4410
634 Develop SVN 초간단 사용하기 hooni 2014.02.28 7679
633 Develop SVN 명령어 (SVN command) hooni 2014.02.28 12220
632 Develop 페이팔에서 돈 찾기 (Paypal withdraw) file hooni 2014.02.20 11480
631 Develop [unix] 유닉스 명령에 메타문자 사용 hooni 2014.02.19 11298
630 Develop [unix] Java 애플릿용 HTML 자동 생성 hooni 2014.02.19 8268
629 Develop [unix] 로그파일 정리 쉘스크립트 hooni 2014.02.19 10875
628 Develop [html] SVG(Scalable Vector Graphics) 간단 정리 hooni 2014.02.13 8867
627 Develop [php] XE 관리자 IP대역 설정 오류 해결법 hooni 2014.02.10 10819
626 Develop [c] 64bit 머신에서 inet_ntoa() 사용시 Segment fault 대처 방법법 hooni 2014.02.08 14261
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 ... 71 Next
/ 71