iOS8 Swift: deleteRowsAtIndexPaths crashes

前端 未结 2 603
挽巷
挽巷 2020-12-19 03:48

I am having some trouble with deleting a row from my tableView in Swift, iOS 8, Xcode 6 Beta 6. Every time I try to delete a row I get an error along the lines of

2条回答
  •  囚心锁ツ
    2020-12-19 04:07

    I believe this is simply a caching problem. Your fetchedResultController is not going to automatically refetch your results as it caches its results. That means that when tableView:numberOfRowsInSection: is called again, the results count is still returning 25 even though you deleted an item.

提交回复
热议问题