1000Memories / TMQuiltView

569 stars 120 forks source link

Reload cells after new cell insertion with NSFetchedResultsController #2

Closed patrickmidori closed 12 years ago

patrickmidori commented 12 years ago

Trying to insert a new Cell with NSFetchedResulltController doesn't seems to reload the cells. New cell doesn't appear event if I put a reloadData after it. It appears when I restarted the app, so the insertion in Core Data works. I'm using the last TMQuiltView.m.

jogloran commented 12 years ago

The problem is that layoutSubviews is never called, which means that the bookkeeping for columns isn't refreshed. If you call [quiltView setNeedsLayout], it should work.

patrickmidori commented 12 years ago

Unfortunately it doesn't seems to change anything. In fact layoutSubviews is called after insertion but nothing happens on the view. Maybe it comes from my code.

bvirlet commented 12 years ago

@jogloran Your commit is not completely accurate because it only takes care of "reloadData".

I fixed the issue here: https://github.com/1000Memories/TMQuiltView/commit/99a0f20259b12695c5c233e3921f88061d450b75