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 [c++] 기초강좌 #04(클래스) hooni 2003.04.23 11870
636 Develop [ios] iOS In App Purchase 코드 부분 샘플 1 hooni 2013.11.20 11800
635 Develop [php] 배열 관련 함수 설명 ㅎㅎ hooni 2003.04.23 11788
634 Develop [php] whois정보 조회 프로그램 hooni 2003.04.23 11773
633 Develop [ios] UIWebView 쿠키 유지 hooni 2014.01.16 11756
632 Develop [vbs] CD롬 뱉는 스크립트.. hooni 2003.04.23 11739
631 Develop [c++] String Tokenizer (나중에 c 코드로 변경해서 사용할 것) hooni 2013.04.23 11729
630 Develop [php] 쉘에서 실행할 때 인수(파라미터) 받기.. hooni 2003.04.23 11654
629 Develop [java] 초간단 싱글톤(Singleton) 패턴 샘플 코드 file hooni 2013.11.18 11632
628 Develop [c] 도스 공격(DoS Attack) 프로그램 file hooni 2013.04.23 11598
627 Develop [ios] Background 에서 네트워크 사용 file hooni 2013.07.22 11594
626 Develop [c] 시간 관련 함수 설명과 예제.. file hooni 2003.04.23 11555
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 ... 71 Next
/ 71