init()

Description

Creates a DcsDocument object from UIImage.

Syntax

- (id) init: (UIImage*) image

Parameters

image:UIImage The image data to create object from.

Return value

ID

Remarks

When image is not nil, it will detect the boundary of the document, process it and return the DcsDocument object.

Exceptions

Circumstance Exception thrown
Image is nil DcsValueNotValidException

Example


@interface ViewController () {
    DcsView *dcsView;
}
@end
 
@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];

    UIImage *ImgIcon = [UIImage imageNamed:@"ICON"];
    DcsDocument *DcsDocIcon = [[DcsDocument alloc]init:ImgIcon];
}

@end

Is this page helpful?

Leave a Reply

Your email address will not be published.