白板

创建批注

批注的内容包括:文件,图片等,让用户能够将批注的文件,保存和共享到你的应用程序中

- (void)annotateOnLocalFiles:(NSArray*)filePathArray
            withDelegate:(id)delegate
                 success:(void(^)(NSString *binderID))success
                  failure:(void(^)(NSError *error))failure;

参数:

名称 描述
filePathArray 指定本地文件路径
delegate 回调接口来处理
Success 回调接口,通知上标注的成功的开始调用应用程序
Failure 回调接口,通知调用应用程序上错误的详细信息

示例代码:

//Create annotaion using local content (documents, images etc...)
NSString *imageFilePath = [[NSBundle mainBundle] pathForResource:@"sampleImage"ofType:@"png"];
NSString *pdfFilePath = [[NSBundle mainBundle] pathForResource:@"sample_pdf"ofType:@"pdf"];
NSArray *filePathArray = @[imageFilePath, pdfFilePath];

[[Betalk sharedClient]
    annotateOnLocalFiles:filePathArray withDelegate:nil
                 success:^(NSString *binderID) {
                    NSLog(@"Start annotating successfully with binderId [%@]", binderID);
               } failure:^(NSError *error) {
                    NSLog(@"Start annotating failed, %@", [NSString stringWithFormat:@"error code [%ld] description: [%@] info [%@]", [error code], [error localizedDescription], [[error userInfo] description]]);
}];