swift - How do you reset a View Controller? -


i want reset view controller when do, app has been reset. basically, want make same if user has closed , relaunched app, except function.

edit: sorry not being clear. want able reset view controller while inside of it. have couple of animations move things around , change text of uilabels, nothing more. now, have 2 workarounds in comments below, seem inefficient.

as duncan c has mentioned there no cheap way reset vc if 1 liner solution. , more complex vc more work you'd have implement reset functionality (which subject code rot depending on how going test or suck time , money if try maintain it). assume vc complex cause if 2 labels , button kind of thing i'm sure would've figured out required 3-liner reset function now.


Comments