Objective-C Property Access

What is the difference in accessing properties or methods of objects using foo.property in [foo property]?

+5
source share
2 answers

Nothing! Spot recording is the “syntactic sugar” introduced in Objective-C 2.0. In fact, the compiler converts foo.property to the [foo] property at compile time, so they compile in exactly the same way.

This is just the question you prefer.

+10
source

, , "." / , .

+1

All Articles