Contents

Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 5799 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
949 Etc 영어. 반드시 외워야 할 문장 패턴 100개 file hooni 2023.06.08 4663
948 Develop [php] Laravel 4. twitter bootstrap 적용하기 hooni 2018.04.05 4673
947 Develop [php] Laravel Route에서 PC/Mobile 분기 hooni 2018.01.24 4677
946 Develop [ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기 hooni 2015.10.23 4696
945 Develop [ios] NSString URL Encode/Decode (인코딩/디코딩) hooni 2014.05.02 4759
944 Develop [ios] 앱 딜리게이트 얻어오기. (AppDelegate) hooni 2014.05.10 4776
943 Develop [matlab] ZigZag-Scanning (2-D Array) file hooni 2016.10.15 4777
942 Develop [iOS] 시뮬레이터에 푸시 알림을 보내는 방법 file hooni 2021.10.13 4801
941 Etc 원어민이 매일 쓰는 일상표현 150개 file hooni 2023.09.17 4882
940 System/OS 서버 확장을 위한 두 가지 방법 file hooni 2018.08.29 4969
939 Etc How to completely Uninstall Coda hooni 2017.10.24 4971
938 Develop [ios] UDID 사용 제한에 따른 대안들 hooni 2014.03.13 4978
Board Pagination Prev 1 ... 15 16 17 18 19 20 21 22 23 24 ... 99 Next
/ 99