jjzjj

extendedURL

全部标签

ios - URL 初始化(字符串 :relativeTo:) works wrong

这个问题在这里已经有了答案:NSURLURLWithString:relativeToURL:isclippingrelativeurl(3个答案)关闭5年前。我试图通过3个步骤构建一个复合url,但结果是错误的!//1)letbaseURL=URL(string:"http://clapps.clappsa.com")!print(baseURL.absoluteString)//http://clapps.clappsa.com//2)letextendedURL=baseURL.appendingPathComponent("public",isDirectory:true)pr