【发布时间】:2016-08-02 19:55:38
【问题描述】:
我已经在 Xcode 8 中将我的项目更新为 Swift3,它出现了这个错误,但我不知道我可以在那里做什么。我已经在谷歌搜索但没有找到任何东西。 有人知道我能做什么吗?
这里是错误:
使用 Objective-C 选择器“collectionViewContentSize”的方法“collectionViewContentSize()”与具有相同 Objective-C 选择器的超类“UICollectionViewLayout”中的“collectionViewContentSize”的 getter 冲突
public func collectionViewContentSize() -> CGSize {
let numberOfSections = collectionView?.numberOfSections
if numberOfSections == 0 {
return CGSize.zero
}
var contentSize = collectionView?.bounds.size
contentSize?.height = CGFloat(columnHeights[0])
return contentSize!
}
【问题讨论】:
标签: uicollectionview swift3 xcode8 contentsize cgsize