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


Stuck on 1st code challenge :(

I'm trying to pass the first code challenge but it is not taking my code, I was forced to cheat on stackoverflow and still won't take any of the following lines I tried...

NSString* welcomeMessage= @"Welcome to Life Leveler";
NSString* welcome= @"Hello";
NSString* welcome = @ "Hello";
NSString *welcome= @"Hello";
NSString* myString= @"testing";   <- direct copy from stackoverflow

Ok I think this code challenge is broken, I just encountered the same test in the "Classes and Objects" stage

- (IBAction)buttonPressed:(UIButton *)sender {
    NSString *myString = @"My name is Leon";
    self.predictionLabel.text = @"Definately yes";
    self.predictionLabel.text = myString;

The above code works in the test app view, however NSString *myString = @"My name is Leon";

Does not work in the code challenge.

2 Answers

Amit Bijlani
Amit Bijlani
Treehouse Guest Teacher

Leon Gaban The instructions on the very first code challenge say: "Create a string named 'treehouse' with a value of 'Treehouse'."

Oh thanks!

/faceplam... I just remember hearing from the video go make a string, I just missed the instructional copy.

Liking the course otherwise :)

Hey Leon,

I had trouble with this at first too:

Directions say do this: create a new string called aString that contains the text "Objective-C is fun".

The code challenge is setup to already encompass most of the other variables so all you need to do is create the string to pass the challenge.

NSString *aString = @"Objective-C is fun";

Should do the trick.