New Sections

A quick warning about the insertSections:withRowAnimation: method of UITableView. If you insert a section with this function inside a beginUpdates/endUpdates block, you should not insert rows into that section (with insertRowsAtIndexPaths:withRowAnimation:) inside the same begin/end block. Somewhat confusingly, the first row insertion appears to work correctly, but subsequent ones tend to crash the program. Caveat insertor.

Share and Enjoy:
  • Twitter
  • Facebook
  • Digg
  • Reddit
  • HackerNews
  • del.icio.us
  • Google Bookmarks
  • Slashdot
This entry was posted in iPhone. Bookmark the permalink.

Comments are closed.