# Objective-C SpriteKit – How to make a circle of buttons [closed]

I have some code in a project already, but I'd like to change it up a bit. Currently, my code creates an empty node called _buttonLayer and then create some buttons to add to it. My buttons start from the top-left corner of the _buttonLayer and then get added all the way to the bottom-right corner.

// Set up button layer.
_buttonLayer = [SKNode node];
_buttonLayer.position = CGPointMake(_centerOfScreen.x - (_buttonSize.width * 1.5) - 5.0,
self.size.height - ((self.size.height * 0.375) + (_buttonSize.height) - 50.0) + 5.0);

// Set up button array.
_buttonArray = [NSMutableArray array];

for (char row = 0; row < 4; row++) {
for (char col = 0; col < 4; col++) {

// Buttons.
SKSpriteNode *button = [SKSpriteNode spriteNodeWithImageNamed:@"LightGreyButton"];
button.name = @"LightGreyButton"; // Initially set it to grey, because they all start off that way.
button.size = _buttonSize;
button.position = CGPointMake(2.0 + ((button.size.width + 3.0) * col),
-(2.0 + ((button.size.height + 3.0) * row)));

}
}


So what I need to do now is create the buttons in a circle – instead of in a square. I'd like to somehow add the buttons into an outline of a circle, and then take the whole _buttonLayer and rotate it. Of course, the way I have it right now, it rotates on the top-left corner of the square. I want the middle of the circle to rotate.

How would I go about doing this?

## closed as off-topic by Josh♦Oct 19 '16 at 15:17

• This question does not appear to be about game development within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

• I'm voting to close this question as off-topic because it is a cross-network post – Josh Oct 19 '16 at 15:17