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) Fundamentals of C Variables

Adam Warner
Adam Warner
546 Points

Problems with ObjC code challenge for "float variable"

Not sure what is going on - no matter what code I put in no result is given. Works just fine in Xcode - but doesn't work in the challenge window. Really need help here. Thank you.

4 Answers

I'll just assume you're stuck on the first code challenge.

This is how you declare a float variable named radius and assign a value of 14.5 to it:

float radius = 14.5;
Adam Warner
Adam Warner
546 Points

Totally get that. I had it figured out - the problem was that when I pressed the "preview" button I saw nothing. This same thing happens on all the code challenges. I'm assuming its supposed to show the result of the code in that vast whitespace, but I see nothing. Safari issue??

You're not supposed to click the Preview button but rather the Check work button.

Adam Warner
Adam Warner
546 Points

Agreed - to complete the challenge. BUT what is the preview button supposed to do if I get nothing on the next screen after I press it? Just wondering if I'm missing something. Thank you for your quick replies btw. Appreciate the help.

Preview will not always show you something useful. When you're working your way through the HTML projects then yes, it will for example show you the output (because it's easy with HTML). But that's not the case with the iOS track. What would you expect to see when you clicked the Preview button? Like now, declaring a variable wouldn't produce much at all. It's hard to show anything when doing iOS because it's all done in Xcode (and not in a browser). Sometimes Treehouse show you what the console would produce, but I guess they didn't deem it important here.

Adam Warner
Adam Warner
546 Points

I was over-thinking it - just worried I was missing something in the teaching experience. Thanks for all the advice!

No worries, glad to help!