I wanted to add a Custom NSView on top of and SKView. However, it is never showing up. Have no clue what is happening...
class GameScene: SKScene {
override func didMoveToView(view: SKView) {
//Trying to add Custom View
let smallView = NSView(frame: NSRect(origin:CGPoint(x: 100,y: 100), size: CGSize(width: 200, height: 200)))
let layer = CALayer()
layer.backgroundColor = CGColorCreateGenericRGB(1.0, 0.0, 0.0, 0.4)
smallView.layer = layer
view.superview!.addSubview(smallView)
}
}
Could anyone who could give me an insight into what is happening here? I even tried adding some NSLabels to the MainStory board. Nothing happens.
I wanted to draw some thing with Coregrapghics and Show on top of the SKScene.But, I can't move forward.