Dot notation
Objective-C programmers call accessor methods a lot. When properties were introduced, Apple also introduced a shorthand dot notation for calling those accessors.
Many Objective-C programmers prefer dot notation because it is easier to type. In main.m, try out dot notation:
int main(int argc, const char * argv[]) { @autoreleasepool { // Create an instance of BNRPerson BNRPerson *mikey = [[BNRPerson alloc] init]; // Give the instance variables interesting values using setters ...
Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.