Restart what user did in current view when app terminates

Discussion in 'iOS Programming' started by sldice, Oct 30, 2010.

  1. sldice macrumors newbie

    Joined:
    Oct 24, 2010
    #1
    Hi,

    Is there a simple way (without getting into a better way I should be creating my whole app), to delete what the user did in the current view controller when app terminates?

    What I am looking for is a way to run a method like applicationWillTerminate but in the current view controller files, not the app delegate. So basically if the user had a score of 2 when the app terminates, I want it to delete the points they got or lost when when they started that view.

    ie (4 buttons) 3 buttons you lose one point, 1 button you get a point. So if 2 lose buttons were pushed, they will get the 2 points back when the app terminates so basically they are starting that view again. Thank you.
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    No. You can use the app delegate to receive the message and then forward that to the view controller.
     

Share This Page