Kodeco Forums

Video Tutorial: Collection Views Part 6: Deleting Cells

In this video we add the ability to delete cells from the collection view.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/3488-collection-views/lessons/7

Hi , Thanks for your video . The problem is When i selected two cell and try deselected one of them , then the ToolBar hide . It’s not coll . So i try to fix that .
What about these lines of code ?
override func collectionView(collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: NSIndexPath) { if editing{ if let indexPaths = collectionView.indexPathsForSelectedItems() { if indexPaths.count == 0 { navigationController?.setToolbarHidden(true, animated: true) } else { return } } } }

But I think it must have better way to do that .