Показать View Controller с Navigation Controller используя для перехода StoryBoardID - Swift 5
LoginCodeViewController - это контроллер на который мы переходим
StoryBoardID - "LoginCode"
let storyboard =
UIStoryboard(
name: "Main",
bundle: nil)
let vc :
LoginCodeViewController =
storyboard.
instantiateViewController(
withIdentifier: "LoginCode") as!
LoginCodeViewController
let navigationController =
UINavigationController(rootViewController: vc)
self.
present(
navigationController,
animated: true,
completion: nil)
// Вариант 2 - без Navigation Controller
let storyboard =
UIStoryboard(
name: "Main",
bundle: nil)
let controller =
storyboard.
instantiateViewController(
withIdentifier: "LoginCode")
self.present(
controller,
animated: true,
completion: nil)
Возврат к списку