Contents

Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 4781 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
549 Develop [c++] 중복실행 방지(Mutex;뮤텍스 ) 샘플 소스.. ㅋㅋ file hooni 2013.04.23 8741
548 Develop [c] OpenGL 시어핀스키 가스킷(p.73 - 첫시간) hooni 2003.04.23 8756
547 Develop [java] 채팅창 처럼.. swing.. file hooni 2013.04.23 8771
546 Develop [c] 압축 알고리즘 소스 및 정리 file hooni 2013.04.23 8780
545 Database [mysql] 쿼리 실행시 ERROR 1366 (HY000) : incorrect string value : for column 3 hooni 2017.03.30 8787
544 Develop [c++] 레지스트리 등록 예제 1 file hooni 2013.04.23 8791
543 Develop [c] 함수 요약 (검색해서 쓰세요..) hooni 2003.04.23 8795
542 Develop [c++] mfc 이용한 트레이아이콘(TrayIcon) 클래스 예제 프로젝트 file hooni 2013.04.23 8796
541 Develop [c] 지나가는 패킷 잡기 hooni 2003.04.23 8802
540 Develop [html] SVG(Scalable Vector Graphics) 간단 정리 hooni 2014.02.13 8834
539 Develop [c++] 윈도우 프로세스뷰어 분석.. ㅋㅋ file hooni 2013.04.23 8840
538 Develop [js] 초간단 암호화/복호화 소스.. hooni 2003.04.23 8843
Board Pagination Prev 1 ... 48 49 50 51 52 53 54 55 56 57 ... 98 Next
/ 98