Resource Base
Table of contents

DCECaptureView

DCECaptureView is the class that enable user to add elements on camera view conveniently.

Method Name Description
addTorch Add torch controlling icon
addOverlay Add overlay
addListener Add view listener
removeListener Remove view listener

addTorch

Add a torch controlling icon on the view.

Objective-C:

@property(nonatomic, strong) DCECaptureView *dceView;
//Add a default torch icon
[_dceView addTorch];
//Or add a personalized torch icon
[_dceView addTorchWith:(nonnull UIImage *) TorchOffImg:(nonnull UIImage *) frame:(CGRect)];

Swift:

var dceView:DCECaptureView! = nil
//Add a default torch icon
dceView.addTorch()
//Or add a personalized torch icon
dceView.addTorch(with: UIImage, torchOffImg: UIImage, frame: CGRect)

addOverlay

Add overlay on the view.

Objective-C:

@property(nonatomic, strong) DCECaptureView *dceView;
//Add a default overlay
[_dceView addOverlay];
//Add a personalized overlay
[_dceView addOverlay:(nonnull UIColor *) fill:(nonnull UIColor *)];

Swift:

var dceView:DCECaptureView! = nil
//Add a default overlay
dceView.addOverlay()
//Add a personalized overlay
dceView.addOverlay(stroke: UIColor, fill: UIColor)

addListener

Add view Listener.

Objective-C:

@property(nonatomic, strong) DCECaptureView *dceView;
[_dceView addListener:(nonnull id<DCECaptureViewListener>)];

Swift:

var dceView:DCECaptureView! = nil
dceView.addListener(listener: DCECaptureViewListener)

removeListener

Remove view listener.

Objective-C:

@property(nonatomic, strong) DCECaptureView *dceView;
[_dceView removeListener];

Swift:

var dceView:DCECaptureView! = nil
dceView.removeListener()

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 1.0.1
    • Version 1.0
    Change +
    © 2003–2021 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support