Вы можете сделать это на доске рассказов
В коде вы можете сделать это:
@IBAction private func nextTapped() {
let storyBoard = UIStoryboard(name: "Main", bundle: nil)
guard let otherViewController = storyBoard.instantiateViewController(withIdentifier: "OtherViewController") as? OtherViewController,
let navigationController = navigationController else {
return
}
// when you push the view controller, pass in animated as false
navigationController.pushViewController(otherViewController, animated: false)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Next",
style: .plain,
target: self,
action: #selector(nextTapped))
}