尝试加载请求时,我这样做:
NSString *urlStrings = [NSLocalizedStringFromTable(@"kPicturesURL", @"urls", nil) stringByAppendingPathComponent:@"Articles/a.pdf"];
NSURL *url = [NSURL URLWithString:urlStrings];
在“urls”里面我有这个键:
/* Service pictures directory */
"kPicturesURL" = "http://192.168.2.104/myApp/Pictures";
我得到了这个结果:(第一行是“urlStrings”,第二行是“url”)
(NSString *) $6 = 0x092a8f60 http:/192.168.2.104/myApp/Pictures/Articles/a.pdf
2012-11-22 09:18:20.093 NPE[7680:c07] Couldn't issue file extension for path: /192.168.2.104/myApp/Pictures/Articles/a.pdf
我试过这些问题:
将 NSString 传递给 NSURL URLWithString ?
这些都不起作用,似乎是什么问题?
谢谢!