hol
hol

Reputation: 8423

Objective-C: Where to see the generated code from setter/getter methods produced with @synthesize?

I am always a bit confused what the different @property parameters do. So I thought the easiest would be to look what XCode generates from it. For me the best documentation is always the source-code itself. In my naivete I am believing that XCode (respectively the pre-compiler behind it) makes some objective-c code from it. Maybe I am wrong.

This is why I ask where to inspect the generated code from @synthesize ?

Upvotes: 2

Views: 1155

Answers (1)

anon
anon

Reputation:

You can’t. There is no precompiler and Xcode doesn’t generate any source code either. The compiler directly generates binary code for those accessors. Those use the runtime library functions objc_setProperty and objc_getProperty. You can find a more in-depth explanation here at Cocoa with Love.

Upvotes: 7

Related Questions