У меня есть следующий код:
- (id)initWithDictionaryRepresentation:(NSDictionary *)dictionary {
self = [super init];
if (self != nil) {
dictionaryRepresentation = [dictionary retain];
NSArray *allKeys = [dictionaryRepresentation allKeys];
NSDictionary *k = [dictionaryRepresentation objectForKey:[allKeys objectAtIndex:[allKeys count] - 1]];
NSArray *stepDics = [k objectForKey:@"Steps"];
numerOfSteps = [stepDics count];
steps = [[NSMutableArray alloc] initWithCapacity:numerOfSteps];
for (NSDictionary *stepDic in stepDics) {
[(NSMutableArray *)steps addObject:[UICGStep stepWithDictionaryRepresentation:stepDic]];
}
............
}
Мое приложение падает по этой строке:
NSArray *stepDics = [k objectForKey:@"Steps"];
, но также падает, если я пытаюсь это сделать:не может получить доступ ни к одному из ключей!
Вот так выглядит мой словарь: http://pastebin.com/w5HSLvvT
Есть идеи?