-2
這是我的代碼。錯誤:fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)
我不知道在哪裏; S問題Swift創建NSURL時出錯
res = "https://www.example.com/range.php?arr1=48.15&arr2=48.15&API_KEY=>code"
let url = NSURL(string: res)! // error line
print("url craeted" + res)
return url
'>'不是URL的有效字符。編碼您的URL:http://stackoverflow.com/q/24551816/2227743,http://stackoverflow.com/a/30149081/2227743等 – Moritz