0

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?

HGDev
  • 2,203
  • 2
  • 17
  • 23
  • This may help: https://forums.developer.apple.com/thread/13580 Seems people are just switching to URL rather than path or using an extension. – Chris Slowik Aug 31 '15 at 23:40

1 Answers1

0

It removed to NSURL, you can use this:

  NSURL(string: yourPath)!.URLByAppendingPathComponent(pathComponent)

or for most compability

 NSString(string: yourPath).stringByAppendingPathComponent(pathComponent)
Yu Jiaao
  • 4,444
  • 5
  • 44
  • 57