Добро пожаловать в комплект спрайтов, я учусь как хорошо и не имели большого опыта работы с shapeNodes, но вот то, что я хотел бы предложить:
//If you want the shape to be that of a rectangle I would suggest using a simpler allocation method such as the following:
SKShapeNode *shapeNode = [SKShapeNode shapeNodeWithRectOfSize:CGSizeMake(self.frame.size.width/2, self.frame.size.height/2))];
/*shapeNodeWithRectOfSize is a built in allocation method for SKShapeNodes that handles
allocation and initialization for you, and will also create the rectangle shape for you.
The CGSizeMake method will return a CGSizeMake object for you*/
/*a CGSizeMake object is an object with two properties: width, and height. It is used to hold
the dimensions of objects. self.frame.size is a CGSize object*/
/*You do not need to set the fill color to nil. This is because the default is [SKColor clearColor]
which is an empty color already*/
//Make sure that you use an initializer method when setting the colour as below
shapeNode.strokeColor = [SKColor redColor];
shapeNode.lineWidth = 3;
[self addChild:shapeNode];
Если вы хотите ссылку детали объекта SKShapeNode тогда я предлагаю смотреть здесь: Apple - SKShapeNode Reference
Если вы хотите источник отличного качества учебников я предлагаю смотреть здесь: enter link description here
Я не тестировал код, поскольку я не могу в данный момент, поэтому дайте мне знать, если он не работает, и я увижу, что я могу сделать, чтобы помочь вам. Еще раз добро пожаловать в Sprite-Kit, надеюсь, это приятный опыт.