简体   繁体   中英

Message flow in Objective-C

Does anyone have a good reference which really outlines how this entire 'message flow' between classes, subclasses, etc.... works in Objective-C? It seems very central to the architecture of the programming environment in Mac world and would be very helpful to understand.

This has been covered in a number of different questions, though to answer different aspects of the question.

This question/answer, in particular, seems relevant:

Objective-C: difference between id and void *

If you are curious as to exactly what happens at a method callsite, I wrote quite the long winded multi-part article giving an instruction-by-instruction tour of objc_msgSend ().

I think what you're after is a discussion of message dispatch in objective-c, there's a rather nice overview here: Objective C message dispatch mechanism

There's also a link in there to apple's runtime programming guide, which discusses objective-c's message dispatch more thoroughly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM