ios - NSUserDefaults deleting keys when close the app -


i need delete keys when application close. should do?

delete keys nsuserdefaults using following code

[[nsuserdefaults standarduserdefaults] removeobjectforkey:@"yourkey"]; 

in applicationdelegate method following state meaning "close app":

- (void)applicationwillresignactive:(uiapplication *)application - (void)applicationdidenterbackground:(uiapplication *)application - (void)applicationwillterminate:(uiapplication *)application 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -