DCS Mobile Guide

@interface ViewController () <DcsUIVideoViewDelegate> {
    DcsView *dcsView;
    UIButton *openVideoViewButton;
}
@end
 
@implementation ViewController
 
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.     
    dcsView = [[DcsView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    //Show VideoView when DcsView is loaded
    dcsView.currentView = DVE_VIDEOVIEW;  
    //Set the next view after the cancel or capture button is clicked.
    dcsView.videoView.nextViewAfterCapture= DVE_IMAGEGALLERYVIEW;    
    
    [self.view addSubview:dcsView];     
  
    openVideoViewButton = [self CreateBackButton];
    [self.view addSubview:openVideoViewButton];
}
 
 
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void) onPostCapture:(id)sender{ 
    openVideoViewButton.hidden = NO;
}
 
- (void) onClick{
    dcsView.currentView = DVE_VIDEOVIEW;
    openVideoViewButton.hidden = YES;
} 
 
- (UIButton *) CreateBackButton:(CGRect)imageFrame{
    CGRect btnFrame = CGRectMake(5,self.view.frame.size.height - 40, 150, 50);
    imageButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    imageButton.frame = btnFrame;
    [imageButton setTitle:@"Back to Camera" forState:normal];
    imageButton.backgroundColor = [UIColor clearColor];
    [imageButton addTarget:self action:@selector(onClick) forControlEvents:UIControlEventTouchUpInside];
    imageButton.hidden = YES;
    return imageButton;
} 
 :CGRectMake((self.view.frame.size.width-SZ_BUTTON_WIDTH)/2, self.view.frame.size.height-111, SZ_BUTTON_WIDTH, SZ_BUTTON_HEIGHT)
@end