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

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

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -