티스토리 뷰

프로그래밍/ios

UITebleView row 삭제할 때

mochitree 2015. 9. 22. 13:47

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0.  The number of rows contained in an existing section after the update (4) must be equal to the number of rows contained in that section before the update (4), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted).'

*** Call stack at first throw:

이러한 에러는
테이블뷰에서 로우를 삭제한뒤 reloadData가 자동호출되는데 dataSource로 객체와 갯수가 맞지 않다는 것임

삭제할때는 배열에서 먼저 삭제한후에 테이블뷰 삭제 과정을 거치면 된다.

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함