Develop
2014.04.08 15:48
[ios] UITableView 특정 Row만 Update
조회 수 4780 댓글 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];
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
297 | Develop | [c] 단기과정[01/17] 후위연산 스택 계산기.. | hooni | 2003.04.23 | 7226 |
296 | Develop | [c] 단기과정[01/15] 피보나치, 파스칼.. 링크리스트 | hooni | 2003.04.23 | 7234 |
295 | Develop | [c] 단기과정[01/14] 피보나치, 파스칼.. 파일입출력 | hooni | 2003.04.23 | 7081 |
294 | Develop | [c] 단기과정[01/14] 파일 입출력 | hooni | 2003.04.23 | 6821 |
293 | Develop | [c] 단기과정[01/10] 과제.. swap(any data, ..) | hooni | 2003.04.23 | 6904 |
292 | Develop | [c] 단기과정[01/08] 배열, 포인터 | hooni | 2003.04.23 | 7223 |
291 | Develop | [c] 단기과정[01/08] 과제.. 파스칼 삼각형 | hooni | 2003.04.23 | 7256 |
290 | Develop | [c] 단기과정[01/08] (다차원 + 배열)포인터, void 포인터 | hooni | 2003.04.23 | 7770 |
289 | Develop | [c] 단기과정[01/07] 제어문, 피보나치수열 | hooni | 2003.04.23 | 7410 |
288 | Develop | [c] 단기과정[01/06] sizeof, 실수표현, 메모리, 연산자 | hooni | 2003.04.23 | 6928 |
287 | Develop | [c] 다중연결 서버 만들기 #4 - thread 사용 | hooni | 2013.04.23 | 23704 |
286 | Develop | [c] 다중연결 서버 만들기 #3 - poll() 사용 | hooni | 2013.04.23 | 6342 |