howto: collect data with a modal view

Discussion in 'iOS Programming' started by drivefast, Jan 20, 2009.

?

how do you post back data entered on a modal view?

  1. i read the new values on the viewWillAppear event of the parent view controller

    0 vote(s)
    0.0%
  2. i post a notification back to the parent view

    0 vote(s)
    0.0%
  3. i use variables a the app delegate level

    0 vote(s)
    0.0%
  4. i have another method

    1 vote(s)
    50.0%
  5. i have no idea what youre talking about

    1 vote(s)
    50.0%
  1. macrumors regular

    Joined:
    Mar 13, 2008
    #1
    i'm pretty sure this is a common situation: you use one view to display data, and you open a modal view to allow the user edit the data. i can think of a few ways to communicate the fresh data back to the original view (view controller) once the editing is done; i was just curious which one do you use (if any).
     
  2. macrumors newbie

    Joined:
    Mar 3, 2008
    #2
    I would put a method in the app delegate to handle it, simply because the app delegate is the only object I know how to easily access through UIApplication's sharedApplication, and from there it is easy to hook the delegate up to any other object.
     
  3. macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #3
    A common theme for me lately - use a Singleton object to hold shared data
     

Share This Page