What is the purpose of using a selector here?
CADisplayLink* displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(render:)];
Source: Code from a beginner OpenGL es 2.0 site
I read the definition
The @selector() directive lets you refer to the compiled selector,
rather than to the full method name.
Unfortunetly, this does not clear it up for me. My expertise is in C#. So I appreciate it if you can relate the answer to how a similar solution might be achieved in C#.
A selector declares the name of a function. That’s it. It’s very similar to the Reflection class
MethodInfo, but it’s much simpler to use.Comparison of C# and Objective-C:
Notice the C# code may be a bit off, as I haven’t worked with it in a long time
As far as the internals of a
SELare concerned, it is aC-stringthat has been put into a private map for speed in lookup at runtime.