class SecondViewController:UIViewController {
required init(coder aDecoder: NSCoder){
super.init(coder: aDecoder)
//Custom logic here
}
}
Quite a newbie question:
a view controller(SecondViewController), inherent from UIViewController needs a designated init function like above.
In this case, how should I call it, given I am not sure what the value for "coder" should be? I used to call the controller as: SecondViewController(), but it gives:
Missing argument for parameter 'coder' in call
I understand coder parameter has to be provided, but want to ask what its value comes from.