Contents

Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 4783 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
945 Develop [ios] Swift 4 Dictionary 사용하기 file hooni 2018.11.29 2033
944 Develop [java] netty (비동기 이벤트 방식 네트워크 프레임워크) 사용법 #2 (client) hooni 2015.01.02 2047
943 Develop [ios] 설정에서 푸시 알림(APNS) on/off 상태 확인 hooni 2015.04.28 2050
942 Develop [c#] mfc 기반의 웹서비스 서버/클라이언트 샘플과 예제 소스 secret hooni 2013.04.23 2073
941 Develop [android] SQLiteOpenHelper를 이용한 DBManager hooni 2017.06.14 2081
940 Develop [c#] MS IE(Internet Explorer) 툴바 버튼 예제 2003/2005 두가지 버전 secret hooni 2013.04.23 2090
939 Develop [ios] 기본 네비게이션바의 타이틀, back버튼 위치와 속성 변경 file hooni 2016.05.16 2098
938 System/OS 서버 확장을 위한 두 가지 방법 file hooni 2018.08.29 2109
937 Develop [android] 안드로이드 앱 문서 샘플 file hooni 2017.07.11 2115
936 Develop [c#] 툴바 최근 버전(IE6, IE7 두가지 버전) secret hooni 2013.04.23 2138
935 Develop [android] 버전 별 앱 알림 설정으로 이동하는 방법 file hooni 2016.11.28 2167
934 System/OS [mac][추천 무료앱] 구름 입력기 - 국내 맥 사용자를 위한 한글 대안 입력기 1 file hooni 2015.01.04 2168
Board Pagination Prev 1 ... 15 16 17 18 19 20 21 22 23 24 ... 98 Next
/ 98