NSInternalInconsistencyException', reason: 'attempt to insert row 0 into section 0, but there are on

来源:互联网 发布:java 尚学堂300 编辑:程序博客网 时间:2024/06/10 22:44

NSInternalInconsistencyException', reason: 'attempt to insert row xx into section xx, but there are only xx rows in section xx after the update'

遇到这个问题

are you changing the numberOfSection and numberOfRowsInSection according to your array after clicks?
返回的 count 总数不对
仔细检查你的
numberOfRowsInSection or numberOfSections
参考:
http://stackoverflow.com/questions/10009172/nsinternalinconsistencyexception-while-adding-row-to-uitableview
http://stackoverflow.com/questions/14931152/tableview-update-nsinternalinconsistencyexception-reason-invalid-update-in
http://stackoverflow.com/questions/11706254/nsinternalinconsistencyexception-reason-attempt-to-insert-row-0-into-section
0 0
原创粉丝点击