I am not using a UIViewController
from a storyboard and I want to have a custom init
function where I pass in an NSManagedObjectID
of some object. I just want to call super.init()
like I have in Objective-C. Like this:
init(objectId: NSManagedObjectID) {
super.init()
}
But I get the following compiler error:
Must call designated initializer of the superclass UIViewController
Can I simply not do this anymore?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…