Hi
I want to add an init function to a UIViewController to ensure that a property that I require is always going to be set. The code is this:
class XBSelectRecord: UIViewController {
convenience init(labelXXX: String?)
{
self.init(nibName: "XBSelectRecord", bundle: nil) ! Ambiguous reference to member 'init(labelXXX:)'
self.heading = labelXXX
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
Clearly that should not be ambiguous. Can anyone explain what I am doing wrong here?
TIA
Mark