1

MyCollectionViewController subclasses UICollectionViewController, UICollectionViewDelegate and UICollectionViewDataSource. It worked just fine before I switched to Swift 2.0. Now I get the following error: "Redundant conformance of MyCollectionViewController to protocol UICollectionViewDataSource".

I checked the official UICollectionView Class Reference but it still states that I have to use both the Delegate and the Data Source. If I don't subclass the Delegate and the Data Source it seems that the app works. Is there anything in particular I should note? Or maybe some updated official documentation?

zmx
  • 1,051
  • 1
  • 10
  • 12

1 Answers1

2

UiCollectionViewController defines itself as conforming to UICollectionViewDelegate and Datasource.

By declaring the conformance again you are making a redundant declaration.

If you read the error message that is exactly what it's telling you.

Just delete the Delegate and Datasource conformance from your subclass.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306