Types conforming to multiple protocols in swift

前端 未结 5 548
一整个雨季
一整个雨季 2020-12-13 11:43

I have an Objective-C variable that conforms to multiple protocols.

id  identityToken; 

How would I re

5条回答
  •  死守一世寂寞
    2020-12-13 12:19

    Swift 3

    var idToken: NSObjectProtocol & NSCopying & NSCoding
    
    func foo(_ delegateAndDataSource: UICollectionViewDelegate & UICollectionViewDataSource) { ... }
    

提交回复
热议问题