isReady()

Description

Returns if the document object is processed and saved.

Syntax

- (BOOL) isReady

Parameters

none

Return value

Bool

Remarks

When isReady returns NO, calling methods such as adjustContrast, adjustBrightness, rotateLeft, rotateRight, etc. will throw the exception DcsDocumentNotReadyException.

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 = [DcsImage imageNamed:@"ICON"];
    DcsDocument *DcsDocIcon = [[DcsDocument alloc]init:ImgIcon];
    [DcsDocIcon isReady];
   
}

@end