0

I have used a custom overlay view over a UIImagePickerController to capture a UIImage.

The custom overlay view has one button. On the click of this button I want to capture the UIImage without closing the UIImagePickerController? How do I get a UIImage without using the didFinishPickingMediaWithInfo method?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Cloy
  • 2,141
  • 23
  • 32

2 Answers2

3

You can use the didFinishPickingMediaWithInfo delegate method. Just don't dismiss the image picker in the delegate method and the image picker will stay in view.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
1

I think picker.takePicture() might do what you want...From the docs:

Use this method in conjunction with a custom overlay view to initiate the programmatic capture of a still image. This supports taking more than one picture without leaving the interface, but requires that you hide the default image picker controls.

dbburgess
  • 751
  • 6
  • 18