iphone - Present another modal view from UIImagePickerController -


The user takes a photo or after selecting saved photo I want to add a confirmation view. The confirmation view will show the selected image in the toolbar with a cancel and upload button.

My UIImagePickerController has been presented as one of my visual controllers, which is controlled by a navigation controller, controlled by a tab bar controller.

How can I model my confirmation view so that the user moves the full screen (like image picker view) when choosing a photo? Ideally, I want something like this:

  - (zero) imagePickerController: (UIImagePickerController *) Picker didFinishPickingMediaWithInfo: (NSDictionary *) information {[Picker Reject Model View Controller Amit: Yes]; UIViewController * modal = [[UIViewController alloc] init]; Modal.view = confirmationView; [Self current model view controller: animated model: yes]; [Modal release]; }  

However, this app crashes should I submit a confirmation view from the picker? If so, how can I ensure that when the confirmation view is dismissed, the picker will not be displayed?

Edit:

The code I have posted, this is when I try to type in memory instead of copy: paste :( Anyway, suggestion now

If I present the Model Controller then the picker is dismissed, nothing happens, possibly because both controllers are later dismissed.

>

If I dismiss the picker, then the model controller is present I get an exception about the modal infection:

  *** Unknown exception 'NSInternalInconsistencyException', reason: 'transmission: 0x6b33 940 & gt; from & lt; UIViewController: 0x6b62b00 & Trying to start a model transition from gt; while one transition is already in progress. Wait for the sceneDeadPower / VisibleDidi to know that the current transit is'  

Resolve. In fact, the picker needs to be dismissed, and To stop the animation for that dismissal, it is instant, and then presents another modal view / P>

Edit: Actually, it always gets me what I want, when If you dismiss the picker, the original scene is shown for the second part, and then the modal scene is animated, it looks a little bit funky.

I also tried to keep the picker around and did not dismiss it. Instead, I call [picker current model widgetulator: Model animated: yes] . This gives me easy transitions from the picker in the confirmation view. However, when I am done with the confirmation view, I need to call [self dismissModalViewControllerAnimated: YES] from the original controller. I have the effect of showing the image picker before sacking it all. From, what I want is not enough.

Ideally, I want the same effect that Facebook uses the iPhone app uploads for photos. After choosing a picture, it makes alternate changes without a confirmation view. Cancellation or confirmation with that view will easily infect the original, main scene. It looks like the confirmation view is a part of the image picker, when it's probably just another custom view.

How do I do this ??


Comments