NSLog crashes with certain NSURL- iOS 9.2

前端 未结 2 1560
北恋
北恋 2021-01-14 11:16

Here is my code,where the crash occurs:-

let URL = NSURL(string: \"http://files.parsetfss.com/fa80bc63-88d4-412d-a478-2451cffc92a9/tfss-1d2a321d-b02e-4745-a5         


        
2条回答
  •  礼貌的吻别
    2021-01-14 12:18

    You should use println instead of NSLog.

    let URL = NSURL(string: "http://files.parsetfss.com/fa80bc63-88d4-412d-a478-2451cffc92a9/tfss-1d2a321d-b02e-4745-a589-e31536f648df-XXXXX%20CAT15%2030.p0001.jpg")!
    println("Loading page with URL: \(URL)")
    

    I have added the option sign ! at the end to unwrap.

提交回复
热议问题