views:

21

answers:

1

I'm trying to have a "Cancel" button send the user to the previous view in my iPhone app. Can postNotificationName be used to do this? How can I define the previous view?

Thanks in advance!

+1  A: 

you're looking for -[NSNotification postNotificationName:object:userInfo:]. this allows you to add objects (such as the view to display, or a string identifier for it) to the notification messages.

Justin
Thanks Justin. Do you, by any chance, know how to call a "previous view" object or define it in some way?
BigMike
something like `-[UIViewController viewWillDisappear:]` should do the trick
Justin