Develop
2014.04.08 15:48
[ios] UITableView 특정 Row만 Update
조회 수 4834 댓글 0
여러개의 특정 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];
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
873 | Develop | [c] 더블(이중) 연결리스트 예제.. | hooni | 2013.04.23 | 7475 |
872 | Develop | [c] 도메인 소켓(Unix Domain Socket) UDP | hooni | 2013.04.23 | 9305 |
871 | Develop | [c] 도메인(호스트)으로 IP정보 알아오기.. (nslookup과 비슷) | hooni | 2013.04.23 | 6937 |
870 | Develop | [c] 도스 공격(DoS Attack) 프로그램 | hooni | 2013.04.23 | 11596 |
869 | Develop | [c] 디피-헬만 키교환(Diffie–Hellman key exchange) 샘플 코드.. ㅋㄷ | hooni | 2013.04.23 | 9117 |
868 | Develop | [c] 라인수 입력받아 마름모꼴 출력하기.. | hooni | 2003.04.23 | 6897 |
867 | Develop | [c] 레포트용으로 제출했던 여러 소스코드 모음 | hooni | 2003.04.23 | 8111 |
866 | Develop | [c] 로또(Lotto) 번호 생성기 | hooni | 2013.04.23 | 7179 |
865 | Develop | [c] 마우스 따라다니는 고양이 - 네코95 (WinAPI) | hooni | 2013.04.23 | 7953 |
864 | Develop | [c] 맵서치인 듯(옛날 컴에서 찾은 자료) | hooni | 2013.04.23 | 6912 |
863 | Develop | [c] 메세지 프로그램 (Server - Agent - Client) | hooni | 2013.04.23 | 6477 |
862 | Develop | [c] 메시지큐(Message Queue) 설명.. (joinc) | hooni | 2013.04.23 | 14293 |