0
嗨,我是新的目标c。从保存的plist文件中检索URL
我将我的URL数据保存在资源下的plist文件中。这是我的代码。
NSString *plistPath =[[[NSBundle mainBundle] resourcePath]
stringByAppendingPathComponent:@"myfile.plist"];
NSDictionary *plistDict = [[NSUserDefaults standardUserDefaults]
dictionaryRepresentation];
if([plistDict writeToFile:plistPath atomically:YES]) {
NSLog(@"success");
} else {
NSLog(@"error");
}
现在我想从保存的plist(我file.plist),我怎样才能检索到,我可以使用该URL的Web视图获取URL。
e.g:
urlString.stringValue = ????
这里我使用urlString.stringValue
的网页流量。
[[webview mainFrame] loadRequest:[NSURLRequest requestWithURL:
[NSURL URLWithString:urlString.stringValue]]];
感谢
非常感谢,它帮助了我。 – fazal 2013-04-05 14:53:24