Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics (Retired) Foundation Framework NSDictionary

fun yo stuff... aka I need help

stuff is not working in your preview, working in my compiler. fix it. plox

insert your code here
Andrew McCormick
Andrew McCormick
17,730 Points

-MOD edit. If you want help, you've got to be more descriptive than "it's not working"
Explain your answer and show your code.
Also, kill the expletives (I edited them out for you), not helpful to the conversation

4 Answers

What isn't working. Talk sense.

Your 3rd objective in NSDictionary requests the user to create two NSString objects prior to entering them into the Dictionary.

aka:

NSDictionary *album = @{@"title":@"Abbey Road", @"artist":@"The Beatles"};
NSMutableDictionary *albumMutable = [NSMutableDictionary dictionaryWithDictionary: album];

NSString *year = [[NSString alloc] init];
year = @"year";

NSString *date = [[NSString alloc] init];
date = @"date";

[albumMutable setObject:date forKey:year];


NSLog(@"%@", albumMutable);
return 0;

Which builds and runs the correct answer in the Xcode IDE.

Kern Tallett
Kern Tallett
10,012 Points

Don't act like a jerk if you are looking for help.

Hi there Leo Vannini! We're sorry to hear you're having trouble with a code challenge. If you could please provide a link to specific challenge you're working on, we'd be happy to help. :)