escape dictionary key double quotes when doing println dictionary item in Swift

前端 未结 5 769
鱼传尺愫
鱼传尺愫 2020-11-30 08:51

I\'ve been playing around with Swift, and just came across an issue. I have the following Dictionary in:

var locations:Dictionary

        
5条回答
  •  不知归路
    2020-11-30 08:56

    Since Swift 2.1 you can use double quotes on interpolation. println("current location is \(locations["current"])")

提交回复
热议问题