Search code examples
iosuinavigationcontrolleruicollectionviewviewwillappear

UInavigation popping back view and updating previous view's content


I have a collection view with cells that can be tapped, and push to a second view. The problem is, the changes I make in the second view are suppose to alter the first view(collection view) when the user pops back to it. By adding a new cell with an image.I can't seem to get the content to update.

I tried to use viewWillAppear on the first view and [colectionview reloadData] it doesn't seem to work. Anyone got a fix for this? help would be greatly appreciated.


Solution

  • I fixed the problem By calling [collectionview reloadData] in viewDidAppear instead of viewWillAppear, only problem is there is a noticeable amount of lag before the cell appears. Anyone know a better way?