Reputation: 2121
When the application is sent to the background, i need the application to shutdown completely. Presently, when my app goes to the background, and when i call it back it shows the view i was working before it went to the background.
I am doing this to release memory.
How can i do this programatically ?
Upvotes: 3
Views: 168
Reputation: 27506
Do not prevent your app from multitasking just because you have memory issues. What you should do is optimize your code and correct these issues.
Look at this guide and the methods that it mentions, they will allow you to know if your application is going to the background for example so that you can release some memory.
Upvotes: 2
Reputation: 2632
Go to your configuration (e.g plist file) and add the following tag :
UIApplicationExitsOnSuspend
and set it to true
Upvotes: 3
Reputation: 21805
Add a key UIApplicationExitsOnSuspend
to YES on info.plist
More info here
Upvotes: 4