@UIApplicationMain 类 AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
lazy var coreDataStack = CoreDataStack()
func getSavePathsForListWithName(_ name: String) -> String {
let pathsArray = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)
let documentDirectory = pathsArray[0]
return documentDirectory.stringByAppendingPathComponent(name)}// Getting error in this line
我正在将 swift 1.2 转换为 swift 3.2,但出现此错误。我已将 stringByAppendingPathComponent 替换为 URLByAppendingPathCompont 但不起作用。
有人可以帮我解决这个问题吗,这对我有很大帮助,在此先感谢。
`