开发者

NSURL getting value from string

开发者 https://www.devze.com 2023-04-09 10:34 出处:网络
I have the following string that I am passing into [NSURL URLWithString:] and getting nil back. I do not see anything wrong with the s开发者_开发技巧tring??

I have the following string that I am passing into [NSURL URLWithString:] and getting nil back.

I do not see anything wrong with the s开发者_开发技巧tring??

/Users/danny/Library/Application Support/iPhone Simulator/4.3.2/Applications/A7C18F62-6ED3-4193-993B-D724ADA4D292/fantasy.app/common/files/file1/movies/demo1.mov

Am I mistaken?

Thanks


Try the +fileURLWithPath: method, it should do what you want.


use this

NSURL *url = [NSURL fileURLWithPath:yourString]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号