You can use a standard dot notation or a method call in Objective-C to access a property of an object in Objective-C.
myObject.property = YES;
or
[myObject setProperty:YES];
Is there a difference in performance (in terms of accessing the property)? Is it just a matter of preference in terms of coding style?
Dot notation for property access in Objective-C is a message send, just as bracket notation. That is, given this:
The last two lines will compile exactly the same. The only thing that changes this is if a property has a
getterand/orsetterattribute specified; however, all it does is change what message gets sent, not whether a message is sent:Both of the last two lines will compile identically.