Here am trying to navigate to another viewController by clicking on a button.
It is navigating to next viewController, but viewDidLoad()
is not calling here
Here is the code which i wrote to navigate to another viewController on clicking on a button
@IBAction func nextButtonClicked(_ sender: Any) {
let OrdersVC = self.storyboard?.instantiateViewController(withIdentifier: “LoginViewController") as! LoginViewController
self.navigationController?.pushViewController(OrdersVC, animated: true)
}
and here is my viewController (which i need to navigate)
@IBOutlet weak var activeButton: UIButton!
@IBOutlet weak var upcomingButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
}
Here am able to get into the class, but viewDidLoad()
itself it is not calling.
How should i achieve this ?
[![Here is my storyboard][1]][1]