load()

Description

Loads all the images and documents in the dirName folder to DcsBuffer.

Syntax

- (void) load: (NSString *) dirName

Parameters

dirName:NSString The name of the folder to load files from.

Return value

Void

Remarks

If there are images and documents in DcsBuffer, to call this function, all the data in DcsBuffer will be cleared and then the new data will be loaded. If the dirName folder doesn't exist, the exception DcsFileNotFoundException will be thrown. If dirName is nil or '', the exception DcsValueNotValidException will be thrown.

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];

    NSString *Path = NSTemporaryDirectory();
    Path = [Path stringByAppendingString:@"DCSSaveFolder"];
    NSLog(@"path: %@",Path);
    [self.dcsView.buffer load:Path];

}

@end

Is this page helpful?

Leave a Reply

Your email address will not be published.