Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to display overlay image on camera #688

Open
Travloper opened this issue Jul 12, 2021 · 0 comments
Open

How to display overlay image on camera #688

Travloper opened this issue Jul 12, 2021 · 0 comments

Comments

@Travloper
Copy link

I have popped oup the cameraa screen using the below code. I want to display an overlay image on the camera. Pl guide me how i can achieve.

Code -

    ```
    let imageView: UIImageView = forImageView
    
    let pickerController = DKImagePickerController()
    pickerController.sourceType = .camera
    pickerController.didSelectAssets = { (assets: [DKAsset]) in
        
        let options = PHImageRequestOptions()
        options.deliveryMode = .highQualityFormat
        options.isSynchronous = true
        
        DKImageAssetExporter.sharedInstance.exportAssetsAsynchronously(assets: assets) { (info) in
            
            for asset in assets {
                if let localTemporaryPath = asset.localTemporaryPath,
                    let data = try? Data(contentsOf: localTemporaryPath) {
                    imageView.image = UIImage(data: data)
                    completion(imageView.image)
                }
            }
        }
    }
    viewcontroler.present(pickerController, animated: true, completion: nil)
    
    completion(nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant