I am currently studying the sample code provided by Apple for Sketch and I stumbled upon some syntax that I haven't seen before.
It's in SKTGraphicView.m
in the function moveSelectedGraphicsWithEvent:
NSRect selBounds = [[SKTGraphic self] boundsOfGraphics:selGraphics];
I have never seen the [SomeClass self]
syntax before. In this case self
is a subclass of NSView
and boundsOfGraphics:
is a class method for SKTGraphic
which is a subclass of NSObject
.
-[NSObject self]
method, not the use of the self "keyword" as it is normally used. – Noisette