이 코드 분할 오류가 발생하는 경우를 컴파일 11 오류 :엑스 코드 8 스위프트 3 분할 오류 : 11
class Test: UICollectionViewLayout {
var sublayout: Sublayout?
override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
sublayout?.shouldInvalidate?(forNewBounds: newBounds, currentBounds: collectionView!.bounds)
return true
}
}
@objc protocol Sublayout {
@objc optional func shouldInvalidate(forNewBounds: CGRect, currentBounds: CGRect)
}
어떤 생각을?
2016 년 9 월 26 일 – e987
동일한 문제가 있습니다. 비록 당신이 그것을 일으키는 원인을 분리 할 수 있었다고해도, Xcode 8 + Swift 3 – user1122069