Resource Base
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 |
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)
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)
Add view Listener.
Objective-C:
@property(nonatomic, strong) DCECaptureView *dceView;
[_dceView addListener:(nonnull id<DCECaptureViewListener>)];
Swift:
var dceView:DCECaptureView! = nil
dceView.addListener(listener: DCECaptureViewListener)
Remove view listener.
Objective-C:
@property(nonatomic, strong) DCECaptureView *dceView;
[_dceView removeListener];
Swift:
var dceView:DCECaptureView! = nil
dceView.removeListener()
latest version