Develop
2014.04.08 15:48

[ios] UITableView 특정 Row만 Update

조회 수 4840 추천 수 0 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
649 Develop [java] 거스름돈 계산.. swing 사용 file hooni 2013.04.23 9458
648 Develop [java] 스윙(swing)버튼 테스트 ㅋㅋ file hooni 2013.04.23 9444
647 Develop [java] 메모패드.. 스윙(swing)으로.. file hooni 2013.04.23 8485
646 Develop [java] 마우스 버튼 테스트.. swing.. file hooni 2013.04.23 7906
645 Develop [java] 채팅창 처럼.. swing.. file hooni 2013.04.23 8792
644 Develop [java] 채팅창 처럼2.. swing.. file hooni 2013.04.23 6447
643 Develop [java] RGB 색상 조절 버튼.. 스윙(swing) file hooni 2013.04.23 7864
642 Develop [c] 달팽이 배열? 인지 먼지.. ㅋㅋ hooni 2013.04.23 7150
641 Develop [c] 패킷 유량/프로토콜 통계 모니터링.. file hooni 2013.04.23 8397
640 Develop [c] 간단한 소켓 프로그래밍 샘플 file hooni 2013.04.23 8185
639 Develop [c] 도메인 소켓(Unix Domain Socket) UDP file hooni 2013.04.23 9313
638 Develop [c] 다중연결 서버 만들기 #1 - fork() 사용 file hooni 2013.04.23 12945
637 Develop [c] 다중연결 서버 만들기 #2 - select() 사용 file hooni 2013.04.23 9378
636 Develop [c] 다중연결 서버 만들기 #3 - poll() 사용 file hooni 2013.04.23 6369
635 Develop [c] 다중연결 서버 만들기 #4 - thread 사용 file hooni 2013.04.23 23748
634 Develop [c] selec()를 이용한 입출력 다중화 file hooni 2013.04.23 8271
Board Pagination Prev 1 ... 11 12 13 14 15 ... 53 Next
/ 53