Beginning Collection Views

Oct 24 2017 Swift 4, iOS 11, Xcode 9

Part 1: Part 1: The Basics

10. Cleaning up the UI

Lesson Complete

Play Next Lesson
Save for later
About this episode
See versions
See forum comments
Cinema mode Mark as Complete Download course materials
Previous episode: 9. Challenge: Deleting Cells Next episode: 11. Conclusion

There's a bug in this project where not all cells are deselected if you leave editing mode with cells selected. The final project for this part of the course has been updated with a fix. To implement it yourself, add the following to the 'setEditing' method, just after setting allowsMultipleSelection:

    collectionView.indexPathsForSelectedItems?.forEach {
      collectionView.deselectItem(at: $0, animated: false)