In the latest build of Xcode 7 (beta 5), the NSString method stringByAppendingPathComponent: has been entirely removed. This had been incredibly useful when working with file paths
Is there a new method to replace this or achieve similar functionality?
It removed to NSURL, you can use this:
NSURL(string: yourPath)!.URLByAppendingPathComponent(pathComponent)
or for most compability
NSString(string: yourPath).stringByAppendingPathComponent(pathComponent)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.