Tried many variations of the derivation below but none work.
import Foundation
import SceneKit
class test:SCNScene{
override init(){
super.init()
}
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
convenience init? (i:UIViewController){
self.init(named:"") //Compile Error:use of self delegating initializer before self.init is called
}
}
According to Swift documentation, rule 2 of initialization, shouldn't init?(named:String) convenience failable Initializer be available after implement the 2 designated Initializer? What am i getting wrong?
init?(named:String)- Paulw11init?(named:String)at test class?init?(named:String)is a convenience initializer and there is no designated initializer that accepts the file not even there is a way to load afterself.init()- MiguelSlvself.init()before your call toself.init(named:"")as the error message says - Paulw11