0

I have a UICollectionView that needs to be updated, reloaded as I need. I have this implemented in other projects but specifically in this one it does not allow the UI to update, even though I can get the code to execute upon reloadData, reloadSections:, and invalidateLayout.

I can see the delegate and datasource methods for the collection view get called when I do this, however the UI does not update at all.

Any advice for workarounds or possible solutions?

My code is fairly generic so I can not understand why this is happening. I subclassed the UICollectionView, but did not add any subclassed initializers to the subclass since I have gotten away with this in other projects and I do not think it is the issue.

I have seen some force the operations onto the mainQueue, but I don't think this is the issue anyway since UIKit updates only run on the main queue.

EDIT: extra info: I perform a reloadData or reloadSections, THEN I called invalidateLayout on collectionView.collectionViewLayout

Michael Lorenzo
  • 628
  • 10
  • 20
  • You're going to have to show your code for anyone to help you. The fact that the data source methods are called, but the UI doesn't update suggests something is seriously screwed up with your project. – rdelmar Nov 22 '14 at 04:03
  • @rdelmar the methods work the first time, but for subsequent calls the UI won't respond – Michael Lorenzo Nov 23 '14 at 01:34
  • Well I fixed it simply by removing all references to the storyboard. It seemed only parts of the collection view linked to the storyboard (Even though I did an init over again) were responding to UI updates. summarily, delete storyboard references, manage programmatically – Michael Lorenzo Nov 23 '14 at 05:19

0 Answers0