How to read "a b.txt" in bundle directory iOS
I hav开发者_StackOverflow社区e a problem right now. I want to read content of file which one have space in file name like "a b.txt" in budle directory. How to do that?
Thanks before. Regards.
NSString* filePath= [[NSBundle mainBundle] pathForResource:@"a b" ofType:@"txt"];
NSString* txt= [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
The space in the filename should not cause a problem.
精彩评论