Save Current Application State?

Discussion in 'iOS Development' started by wearmaize, Apr 26, 2009.

  1. wearmaize

    wearmaize Active Member

    Joined:
    Feb 13, 2008
    Messages:
    2,442
    Likes Received:
    13
    Device:
    iPhone 4S (Black)
    I have made an application that has tabs at the bottom of the screen. There are four tabs and the "more" option that lists tabs that didn't fit. When you tap "edit" you can add, remove, or replace the tabs on the bottom of the screen in the tab bar. However, any time you relaunch the app, the tabs are back in their default positions. How can you make the application save the current configuration of the tabs?
    Thanks
  2. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    Look at the documentation on NSUserDefaults it's a really useful class.
  3. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Just tag the tabs. When rearranged or whatever, save the order into an array. Save that array into NSUserDefaults. On load, read in that array and order your tabs accordingly.
  4. johnmabassa

    johnmabassa Member

    Joined:
    Mar 16, 2009
    Messages:
    87
    Likes Received:
    0

Share This Page