iOS 中 NSUrl和NSString的相互转化
NSString转NSUrl:NSString *str = @"www.ngmob.com";
NSURL *URL = [NSURL URLWithString:str];
NSUrl转NSString:NSString *str1 = [URL absoluteString];
//从自定义NSBundle中读取某个文件
NSURL *binFileURL=[[NSBundle mainBundle] URLForResource:@"binFile.bundle/ICV6-1.5.bin" withExtension:nil];
NSData * fileData = [NSData dataWithContentsOfURL:binFileURL];
网友评论