A view's 'delete' button is pressed. The view belongs to a view controller, which handles the button press. However, that view controller is a child of a container view controller, so it sends its delegate a message that a deletion was requested, and includes the object that should be deleted.
The delegate (the parent view controller) receives the notification and presents a UIActionSheet
to confirm the deletion. It also makes itself the delegate of that action sheet.
The user confirms the deletion, and parent view controller is ready to delete the object. Except it has to do this in actionSheet:didDismissWithButtonIndex:
. By that point, it no longer knows which object was passed down from the child view controller.
Is there a way to attach an object to the alert sheet so that when it's dismiss action is fired, that object can be retrieved?