我是否可以通过创建SKSpriteNode
来模仿UIView
的行为,以便在其中指定边界和拐角半径?
self.view.layer.borderColor = [UIColor lightGrayColor].CGColor;
self.view.layer.borderWidth = 2;
self.view.layer.cornerRadius = 2;
self.view.layer.masksToBounds = YES;
最佳答案
不是本地的。虽然您可以仅将SKShapeNode添加为使用path
创建其CGPathCreateWithRoundedRect
的子代。