Я не понимаю, почему он не может добавить элемент в мой словарь. В моей консоли я всегда получаю «Это не здесь!» Я разместил свой код нижеNSMutableDictionary не добавляет элементов
//.m
#import "ExercisesViewController.h"
#import "STATableViewController.h"
@implementation ExercisesViewController
@synthesize descriptionLabel = _descriptionLabel;
@synthesize descriptionsDictionary = _descriptionsDictionary;
@synthesize objName = _objName;
- (void)viewDidLoad
{
[super viewDidLoad];
_descriptionsDictionary = [[NSMutableDictionary alloc]init];
[_descriptionsDictionary setObject:@"foo" forKey:@"bar"];
if([[_descriptionsDictionary allKeys] containsObject:@"foo"])
NSLog(@"It's here!");
else
NSLog(@"It's not here!");
}
Да, это была моя собственная глупость, спасибо :) –