2011年2月18日 星期五

Property Lists

從 bundle 中讀取 plist 範例:


- (void)viewDidLoad {
   NSString *path = [[NSBundle mainBundle] pathForResource:@"sortednames" ofType:@"plist"];
   NSDictionary *dict = [[NSDictionary alloc] initWithContentsOfFile:path];
   [dict release];
}

沒有留言:

張貼留言