Eri-Sklii
Eri-Sklii

Reputation: 589

Detect application close

Is there any way to detect if the application fully closes? Not only minimize but fully close application? I want to run a code that delete a NSUserDefault key when the application closes. Is this possible?

Upvotes: 3

Views: 1395

Answers (1)

Fred Faust
Fred Faust

Reputation: 6790

In your AppDelegate there's a method:

applicationWillTerminate

You can probably take care of what you need to there.

Upvotes: 5

Related Questions