こんにちは、plist から値を読み込もうとしています。これは私の plist が atm のように見えるものです。
<plist version="1.0">
<array>
<dict>
<key>Title</key>
<string>Mickey Mouse</string>
<key>Image</key>
<string>mickeymouse.png</string>
<key>Hint1</key>
<string>Hint 1</string>
<key>Hint2</key>
<string>Hint 2</string>
<key>Hint3</key>
<string>Hint 3</string>
</dict>
<dict>
<key>Title</key>
<string>Peter Pan</string>
<key>Image</key>
<string>peterpan.png</string>
<key>Hint1</key>
<string>Hint 1</string>
<key>Hint2</key>
<string>Hint 2</string>
<key>Hint3</key>
<string>Hint 3</string>
</dict>
</array>
</plist>
これは私が使用しているコードですが、クラッシュするだけです。
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
NSString *questionNumber = [NSMutableString stringWithFormat:@"Item 0"];
NSString *path = [[NSBundle mainBundle] pathForResource:@"Level1" ofType:@"plist"];
NSMutableArray *array = [[NSMutableArray alloc] initWithContentsOfFile:path];
NSDictionary *questionNumberDictionary = [array objectForKey:questionNumber];
NSString *questionTitle = [questionNumberDictionary objectForKey:@"Title"];
NSString *questionImage = [questionNumberDictionary objectForKey:@"Image"];
NSString *questionHint1 = [questionNumberDictionary objectForKey:@"Hint1"];
NSString *questionHint2 = [questionNumberDictionary objectForKey:@"Hint2"];
NSString *questionHint3 = [questionNumberDictionary objectForKey:@"Hint3"];