Convert an NSURL to an NSString

前端 未结 7 908
伪装坚强ぢ
伪装坚强ぢ 2020-12-02 04:30

I have an app where the user can choose an image either from the built-in app images or from the iphone photo library. I use an object Occasion that has an NSString

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 05:15

    Try this in Swift :

    var urlString = myUrl.absoluteString
    

    Objective-C:

    NSString *urlString = [myURL absoluteString];
    

提交回复
热议问题