[Solved] How do I restart a view controller from the press of a button? [closed]


Sounds like you need to re-architect your design. Have a loadView method that will either:

  • Create your UI elements and add them to the screen
  • Passes in your data to the elements that are already in place

Call this method inside your viewDidLoad so it runs when the screen loads. Now when you want to “Restart”, either call this method and have the data updated or delete all the subviews and call this method to have it redrawn.

solved How do I restart a view controller from the press of a button? [closed]