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 Build a Self-Destructing Message iPhone App Using Parse.com as a Backend and Adding Users Signing Up New Users: Part 2 (PFUser)

Susan Huffaker
Susan Huffaker
3,546 Points

Using Parse.com - challenge to set username and password from UITextProperties

I'm not sure what this question is looking for. It seems fairly straightforward but nothing seems to work.

Shouldn't this work?

NSString *username = self.usernameField.text;
NSString *password = self.passwordField.text;

2 Answers

Kevin Hamil
Kevin Hamil
8,203 Points

The problem states that 'username' and 'password' are properties, which means they've already been declared in the header file. All you have to do is reference them with self.

self.username = self.usernameField.text;
self.password = self.passwordField.text;

Anytime I've encountered a problem like this where I believe I have the right answer, but it's still wrong... I assume I must have missed something, so I re-read the question again, very carefully. Almost every time I realize I misread the question or overlooked a detail. Hope that little reminder helps you problem solve in any future quiz.

Susan Huffaker
Susan Huffaker
3,546 Points

I swear I tried that last night and it didn't work so I tried again this morning and it worked! Maybe restarting helped. Anyway, thank you Kevin!!