NSURL getting value from string
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]
精彩评论