O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Properties in Detail

When getting into Objective-C programming, the declaration of properties is sometimes confusing. In Java, you declare some private variables in the class, and then create getters and setters as needed. Things seem much more involved in Objective-C, so a more detailed look at the properties is warranted. The properties in Objective-C are very similar to the automatic properties available in C#.

When you declare a property like this in Objective-C:

@property (nonatomic, strong) NSString *title;

you actually tell the compiler to do several things in a single line:

Image Declare a class variable called ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required