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) Advanced Objective-C Dynamic Typing

Assign an NSNumber literal with a value of '4' to the variable 'thing'.

id thing = nil;

NSNumber *number; number = @4;

3 Answers

Stone Preston
Stone Preston
42,016 Points

you are suppose to assign the literal value ( @4 ) to the thing variable you created in task 1, not a whole new NSNumber variable. Just assign it to thing

Hey Tim,

as usual I had a harder time that I should have with this one as well. I'm sorry I didn't call you back the other day, I didn't know that you were having trouble with this one as well. It is much less than what your thinking. Literal is just that

you have already done the first part correct now they want you to give "thing" a literal value so

thing = @4;

I smacked myself on the forehead when I finally got it right, but like I said, it was a trial an error, and once again I thought I had to be doing to much work like that other question we talked about. So I tried the least complicated answer and boom. Hit me up if you have trouble with part 3.

T-Bone

Thanks bro!