我用的是CollectionViewWaterfallLayout。在“如何使用”部分,它说
集合视图的委托必须符合
CollectionViewWaterWallLayoutDelegate协议并实现
必需的方法,您只需返回
项目:
func collectionView(collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize
我应该在这里做什么?如何使集合视图的委托符合集合视图WaterWallLayoutDelegate协议?
最佳答案
在声明类时,您是否编写了符合UICollectionViewDelegae的代码。示例代码如下:
class myViewController : UIViewController, UICollectionViewDelegate {
...
}
关于ios - 集合 View 的委托(delegate)符合另一个协议(protocol),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/36199811/