UIAlertView Question

Discussion in 'iOS Programming' started by Rappa819, Oct 6, 2009.

  1. Rappa819 macrumors newbie

    Joined:
    Feb 28, 2008
    #1
    I have a UIAlertView that pops up when the program launches. I was wondering if there was a way to say like, This message will pop up x more times. and then decrement every time it starts until it hits 0 and then will not show ever again unless the program is reinstalled.

    I did not know exactly what to search for.
     
  2. rossipoo macrumors regular

    Joined:
    Jun 7, 2009
    #2
    Of course this is possible. You just to have a counter variable that you save to a file, and load from each time the application starts. If you save the file inside the application package, it will be removed when the application is.
     
  3. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #3
    You could also save the value to NSUserDefaults.
     

Share This Page