Alex Stone Alex Stone - 1 year ago 341
iOS Question

Can I add a border to an SKSpriteNode, similar to UIView?

I'm interested if an

can be made to imitate the behavior of a
where I can specify border and corner radius?

self.view.layer.borderColor = [UIColor lightGrayColor].CGColor;
self.view.layer.borderWidth = 2;;
self.view.layer.cornerRadius = 2;
self.view.layer.masksToBounds = YES;

Answer Source

Not natively. Though you can just add a SKShapeNode as child whose path you create with CGPathCreateWithRoundedRect.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download