我调用了UICollectionViewDataSource和UICollectionViewDelegate,并在代码中链接了Main.Storyboard上的出口。此行发生此错误:
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.categories.count
}
也是类别,
var categories : [Category] = []