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


Properties in objective-c

Hello fellow programmers,

I'm seeking help to make a simple application on the OS X. The app is in it's early stages and it will advance as I learn, right now I'm struggling with making my own class which is a "User" class it holds NSString *username & NSString*password.

I have been trying to write some code to create a new user every time an action in the interface occurs, the code itself is my issue.

Let's say my code is like this :

@interface User : NSObject {
    NSString *username;
    NSString *password;

@property (strong,readwrite) NSString *username;
@property (strong,readwrite) NSString *password;

Now my implementation file just synthesizes both properties. How can I make use of those properties?

1 Answer