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.

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!!