General questions

Answered

iink ios 如何只识别一部分区域

Hi,

我设置了editort size 的区域是[self.editor setViewSize:CGSizeMake(1080, 1512) error:nil];  但是我只想识别CGRectMake(300,0, 300, 300)区域的内容,其他区域不识别,该如何设置呢?谢谢!!!


Best Answer

Answer

Dear Huang Beyond,


Currently, the solution could consist in creating several text blocks, one for each zone: https://developer.myscript.com/docs/interactive-ink/1.3/ios/fundamentals/editing/#content-blocks


For each, you can then export the content: https://developer.myscript.com/refguides/interactive-ink/android/1.3/com/myscript/iink/Editor.html#export_-com.myscript.iink.ContentBlock-com.myscript.iink.MimeType-


Best regards,


Olivier

Dear Olivier @MyScript,

    谢谢你的回复,请问有example code吗?因为我没有发现IINKContentPart如何设置rect的方法

Dear Huang Beyond,


Currently, you can refer to the API documentation: http://cocoadocs.org/docsets/MyScriptInteractiveInk-Runtime/1.0.0/Classes/IINKEditor.html#//api/name/addBlock:type:error:


An example can be found into the MainViewController.m file of the Demo project (line 335).


Please note using the addBlock function, you do not provide with a rect but the coordinates of the top left corner of the block you want to add.


Best regards,


Olivier

Dear Olivier @MyScript,

 我调用了[self.editor addBlock:CGPointMake(0, 0) type:@"Text" mimeType:IINKMimeTypeText data:@"123" error:nil] 函数,

发现识别(调用export_:mimeType:error:)得出来的是 “123”;而我想识别的是笔记绘制的字,不是data设置的值;

目前,我有什么方法能解决这个问题呢?

Dear Huang Beyond,


I am currently a bit puzzled by your question.


If I understand well, you would like to recognize the data that is written in your block? But in your case, when calling "[self.editoraddBlock:CGPointMake(0, 0) type:@"Text"mimeType:IINKMimeTypeTextdata:@"123"error:nil]", this means you add the "123" data, which will then be recognized?


If you do not want it to be recognized, why are you adding it? Or you can use the addBlock function without data?: http://cocoadocs.org/docsets/MyScriptInteractiveInk-Runtime/1.0.0/Classes/IINKEditor.html#//api/name/addBlock:type:error:


Best regards,


Olivier