Created
July 6, 2011 10:48
-
-
Save matsumos/1066991 to your computer and use it in GitHub Desktop.
バンドルしたXMLの読み込み
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)hogehoge | |
{ | |
NSString *path = [[NSBundle mainBundle] pathForResource:@"hoge" ofType:@"xml"]; | |
// とりあえずファイルの中身をトレース | |
NSError *error = nil; | |
NSString *str = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error]; | |
NSLog(@"str:%@", str); | |
// URLに変換したいならこう | |
[NSURL fileURLWithPath:path]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment