Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.


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.

Faye Bridge
Faye Bridge
4,879 Points

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. :)