[UITableView _endcellanimationswithcontext:]

Source: Internet
Author: User

as the project needs, do a UITableView to implement the delete function. the 1.TableView is grouped. 2. After clicking the Delete button, a row is deleted.  appears: [uitableview_endcellanimationswithcontext:],/sourcecache/uikit_sim/uikit-2372/uitableview.m:1070

Libc++abi.dylib:handler threw exception

  Reason:  1. Before calling the deleterowsatindexpaths: method, make sure the data is up to date. In other words, the data to be deleted is removed from the data source first.
2. Grouping and grouping the number of rows is variable and cannot be written as dead!
3. If you are grouping, you will find strange phenomenon: When a group, there are multiple data, you delete one of the, correct; When a group, you want to delete the only one, you will still report the error as above!  
When you delete the last piece of data in a group, the number of groups, and the number of rows, changes. At this point, only the deleterowsatindexpaths method is called. That is, only the number of rows is manipulated, but the grouping of changes is not manipulated! Check out the Help API to find such a method:deletesections: Method! Plus go, delete the group as you delete the last record in a group!  

 

[UITableView _endcellanimationswithcontext:]

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.