storyboard doesn't contain a view controller with identifier '
遷移先のStoryBoardにTABBar Controllerなどがある場合、初期表示画面のStoryBoardにIDを設定しておく必要がある。
書き方-1 idを指定する
let storyboard = UIStoryboard(name: DiaryIndexController.className, bundle: nil) let nextVC = storyboard.instantiateViewController(withIdentifier: DiaryIndexController.className) self.present(nextVC, animated: true, completion: nil)
書き方-2
インスタンスを生成するだけで、あとはStoryBoardに委ねる
let nextVC = UIStoryboard(name: DiaryIndexController.className, bundle: nil).instantiateInitialViewController()! self.present(nextVC, animated: true, completion: nil)
こんなところが嫌いで、SwiftUIになったのかな と個人的には思います。