Kashif
Kashif

Reputation: 4632

Simple Overlay View on UIImagePickerControler.Camera

I am initiating a camera capture via UIImagePickerController (sourceType = .Camera)

I have created a simple ViewController overlayVC and designed it in IB

I wish to overlay overlayVC on top of the camera now. How do I accomplish this in swift?

I understand I need to use UIImagePickerController.cameraOverlayView property but this property wont take overlayVC directly. What step am I missing?

Upvotes: 0

Views: 122

Answers (1)

Kashif
Kashif

Reputation: 4632

I figured it out my self:

let overlay = self.storyboard?.instantiateViewControllerWithIdentifier("OverlayVC")
image.cameraOverlayView = overlay?.view

Upvotes: 1

Related Questions