Search code examples
iosobjective-cstoryboardscene

Exit From A Scene Of Storyboard


I am Using Xcode 6.3.2 and I Have A Question. i Want to Release a scene Of Storyboard When I Go To Another Scene. How Can i Do It? Releasing a Scene Of Storyboard That When i go To It Again,It Start similar To First Time.

ARC On My Project Is On.

Thanks EveryOne.


Solution

  • I don't know that you can unload a view controller, but you can reset anything in the class by calling viewWillDisappear (or viewDidDisappear) when you leave. Also, functions and settings that should happen anew on every return should be placed in viewWillAppear (or viewDidDisappear) instead of viewDidLoad.

    Also check other answers:

    What is the proper way to unload views in iOS 6 in a memory warning (Apple doc flaw)?