xCode 7.1 + swift2.1 + iOS 9.0
下面的代碼阻止Xcode編譯操作。複雜的字典封鎖Xcode編譯操作在swift
let dic_1:Dictionary<String,Int> = ["key":200]
print("dic_1---->\(dic_1)")
這是否發生過任何人?這是怎麼發生的?
感謝您糾正語法錯誤。
我發現它不是上述代碼的原因。
我起源代碼如下:
let dic_1 = [
"status": 200,
"info": "1234",
"data":[
"st_id":"st_id",
"st_name":"radiant",
"address":"dire",
"longitude":"122.111",
"latitude":"123.000000",
"is_favorite":"0",
"score":"5",
"thumbnail":"www.baidu.com",
"comment_count":"45612",
"cert_img_url":"www.baidu.com",
"has_inspay":"1",
"has_car_discount":"1",
"has_groupon":"1",
"score_environment":"4.5",
"score_service":"5.0",
"score_oil":"5.0",
"type":"98",
"city":"SHENZHEN",
"show_price_discount":"1",
"is_support_invoice":"1",
"price":[
[
"oil_name":"95#",
"market_price":"6.23",
"sell_price":"6.00",
"wecar_price":"-100.00"
],
[
"oil_name":"95#",
"market_price":"6.23",
"sell_price":"6.00",
"wecar_price":"-100.00"
],
[
"oil_name":"95#",
"market_price":"6.23",
"sell_price":"6.00",
"wecar_price":"-100.00"
],
],
"promotions": [
"promotion1",
"promotion1",
"promotion1",
"promotion1"
],
"gpns":[
[
"gpn_id":"75642",
"gpn_name":"gpn_name",
"oil_type":"95",
"price":"180",
"sell_amount":"20000000",
"old_price":"200"
]
],
"discount_items":[
[
"desc":"It's a descrition.",
"disc_type":"1"
]
]
]
]
print("dic_1---->\(dic_1)")
遊樂場運行運行,從來沒有弄清楚anything.So會發生這種情況在iOS中project.No錯誤,只是運行。
你試圖通過自己讓迅速斷定類型? – kabiroberai
也許你應該刪除前導單引號字符 – vadian
什麼是錯誤信息?該代碼在遊樂場中工作正常 –