xcode - Link sks file to swift class -


i unable link sks file swift class.

i have sks named gamescene.sks , swift file named gamescene.swift

custom class sks file set gamescene

contents of gamescene.swift -

import spritekit import gameplaykit  class gamescene: skscene {      private var label : sklabelnode?     private var spinnynode : skshapenode?      override func didmove(to view: skview) {         print("here")     } } 

the print statement not executed. didmove method never executes.

try below piece of code.

    let scene = gamescene(filenamed:"gamescene")     let skview = self.view as! skview     skview.presentscene(scene) 

Comments