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

Gundra Kiran
PLUS
Gundra Kiran
Courses Plus Student 5,931 Points

"Your 'album' dictionary doesn't have any values in it". But I feel that my statement is syntatically correct, pls help

I working Dictionaries in objective c.

Jhoan Arango
Jhoan Arango
14,575 Points

Sorry I wish I could help you with this answer, I don't speak Objective-C .. :( I work with Swift.

But heads up, show your code for the next person to be able to help you.

Gundra Kiran
Gundra Kiran
Courses Plus Student 5,931 Points

NSDictionary *album = @{@"title":@"Abbey Road",@"artist":@"Beatels"}; on this statement I am facing trouble.

1 Answer

Martin Wildfeuer
PLUS
Martin Wildfeuer
Courses Plus Student 11,071 Points

Although you are declaring your Dictionary correctly, your values don't match those asked for in the assignment:

Declare an NSDictionary variable named 'album'. Assign the following key/pairs to it: "title" - "Abbey Road", "artist" - "The Beatles".

So instead of the artist being "Beatels"...

NSDictionary *album = @{ @"title": @"Abbey Road", @"artist": @"Beatels" };

... it has to be "The Beatles"

NSDictionary *album = @{ @"title": @"Abbey Road", @"artist": @"The Beatles" };

Make sure to follow the instructions in detail, code check will only ever pass if your values and names are exactly the same as in the assignment.

Hope that helps :)