jape jape - 4 months ago 20
iOS Question

Perform different function based on button that activates UIImagePickerController

I have two buttons, and when each is pressed, a

will appear.

I can select and retrieve the photo just fine. However, I want to do something different based on which button started the action.

Is there a way to determine which button caused the initial
to appear in the


There is no magic. You need to somehow save your state, and when the delegate method is called, determine your state and act accordingly. The easiest here, is to add a property or instance variable to your controller and update it with a unique value (such as enum) for each button.