9 -- URL中有中文

2016-08-18  本文已影响0人  _Nevermore

OC:

 NSString* string2 = [string1 stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

swift:

 guard let URL = course.courseImageURL?.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding) else{return ""}
    return URL
上一篇下一篇

猜你喜欢

热点阅读