Immutable/Mutable Collections in Swift

后端 未结 7 1388
不知归路
不知归路 2020-11-29 18:44

I was referring to Apple\'s Swift programming guide for understanding creation of Mutable/ immutable objects(Array, Dictionary, Sets, Data) in Swift language. But I could\'t

相关标签:
7条回答
  • 2020-11-29 19:38

    If you want to work with Array (Swift) as with NSArray, you can use a simple bridge function. Example:

    var arr1 : Array = []
    
    arr1.bridgeToObjectiveC().count
    

    It works the same for let.

    0 讨论(0)
提交回复
热议问题