Matt Sephton
Matt Sephton

Reputation: 4122

How would you pass data from a child view to a parent view using the iPhone SDK?

Which method would you recommend to pass data from a child view back to it's parent view?

Upvotes: 1

Views: 2476

Answers (1)

Ben Gottlieb
Ben Gottlieb

Reputation: 85522

There are a number of ways to do this.

  • Set a member variable in the child when its added to the parent
  • Send a message to [self superview]
  • Use an NSNotification
  • There are others, too, of course, but these are the three I use most often.

    Upvotes: 5

    Related Questions