0
本來我試圖用這樣的:覆蓋URL描述
extension URL: CustomStringConvertible{
public override var description: String {
let url = self
return url.path.removingPercentEncoding ?? ""
}
}
修復編譯器警告代碼後變成了:
extension URL{
public var description: String {
let url = self
return url.path.removingPercentEncoding ?? ""
}
}
但
print(fileURL)
仍顯示與百分比舊的URL描述。