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.
Video didn't show all of the needed codes for Dynamic Type. Can't figure out the Challenge Task. Need the codes for Shape.h
Charlie O'Shea18,737 Points
I don't think part 2 was ever explained in the preceding video.
Plus it's hard to follow along when files suddenly appear in the navigation that we haven't got.
Challenge task 1 of 3 Declare a variable named thing of type id and initialize it to nil.
Stone Preston42,016 Points
declaring a variable of type id generally looks like:
id variableName = value;
note that since id types are pointers by default, you dont use an asterix like you would regular object variables.
so to declare an id type named thing and initialize it to nil you would use:
id thing = nil;
Got that part. It's the next 2 steps that's driving me nuts
Challenge task 2 of 3 Assign an NSNumber literal with a value of '4' to the variable 'thing'.
Wow! Thanks. How bout the last one? Here's what I got...
NSLog(@"thing = 4", thing);
It's saying that I got the string right but the format was wrong
Yeah, you should put the "do this" in the actual tutorial. Also, the shape.h and shape.m files are not anything I'd built leading up to this point...