plist から にデータをロードする際に問題がありNSMutableDictionary
ます。シミュレーターでは、すべてが機能します。iPad に展開すると、最初にこの関数を呼び出すとすべてが機能しますが、この関数を 2 回目に呼び出すdict
とnil
. 何が問題なのですか?
これが私の機能です:
- (NSMutableDictionary*) getDataFromPList: (NSString*) pList fromElement:(NSString*) element{
NSString *ressourcePath = [[NSBundle mainBundle]resourcePath];
NSString *filePath = [[NSString stringWithFormat:@"%@/%@", ressourcePath, pList] retain];
NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath];
return [dict objectForKey:element];
}