私は必要なinit(コーダーaDecoder:NSCoder)を持つviewcontrollerを持っています。他のクラスにインスタンスを作成したいです。ここに私のコードSwiftの他のViewControllerでviewcontrollerのインスタンスを作成できません
class ViewControllerB: UIViewController { @IBOutlet weak var tableview: UITableView! required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) }}
は、私がViewControllerAにViewControllerBのインスタンスを作成したいです。
おかげで、実際には初期化が必要であった(コーダaDecoder:NSCoder)を呼び出すことができますか?{ でsuper.init(コーダー:aDecoder) }}、あなたの答えは機能しません –