Initialize Dynamsoft Camera View

In order to use functions of Dynamsoft Camera SDK iOS Edition, you need to initiate dcsView before using any methods and properties.

@interface ViewController () {
    DcsView *dcsView;

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    dcsView = [[DcsView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];

    [self.view addSubview:dcsView];

class ViewController:UIViewController{
    var dcsView:DcsView!
override func viewDidLoad() {
    dcsView = DcsView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height));

How to set current view

The default current view is DVE_IMAGEGALLERYVIEW. You can use property currentView to set it to the other view.

self.dcsView.currentView = DVE_VIDEOVIEW;

Check related properties here (Swift, Objective-C).

Is this page helpful?

Leave a Reply

Your email address will not be published.