小编Jos*_*eph的帖子

货币代码返回nil

如下所示,对货币代码的简单请求应返回货币代码,但返回nil.我是否需要在申请货币代码之前设置区域,或者是否有我遗漏的东西.我在我的模拟器上使用Swift 3.1和Xcode 8.3.3 iphone 6和相同的结果.

    if let currencyCode = Locale.current.currencyCode {
        print(currencyCode)
    }
Run Code Online (Sandbox Code Playgroud)

swift swift3

0
推荐指数
1
解决办法
186
查看次数

标签 统计

swift ×1

swift3 ×1