swift - MyScript Interactive Ink SDK 转换为数学返回?
问题描述
我正在使用 MyScript Interactive ink SDK 来转换手写数学方程。我使用他们拥有的测试示例测试了 SDK,一切都很好。我将他们的许多代码逻辑导入到我的应用程序中,并且能够成功设置引擎和编辑器。我可以编写项目,甚至可以在编辑器中使用重做、清除和撤消项目。问题是每次我试图隐藏它时,它都会返回一个“?”。
要转换的函数如下所示,与 MyScript 提供的示例中的代码完全相同 -
@IBAction func ConvertButtonWasTouchedUpInside(_ sender: UIBarButtonItem) {
do {
editorViewController.editor.waitForIdle()
let supportedTargetStates = editorViewController.editor.getSupportedTargetConversionState(nil)
try editorViewController.editor.convert(nil, targetState: supportedTargetStates[0].value)
} catch {
print("Error while converting : " + error.localizedDescription)
}
do
{
try equationInLatex = editorViewController.editor.export_(nil, mimeType: .laTeX)
}
catch
{
print("Error while printing : " + error.localizedDescription)
}
print(equationInLatex)
}
在 AppDelegate.swift 文件中为引擎创建包的代码和在引擎中设置的代码也是相同的。
我附上了一张关于返回值的图片
像这儿
我无法弄清楚为什么我会遇到此错误以及引擎和/或编辑器设置的哪一部分我做错了。
谢谢你!
解决方案
推荐阅读
- angular - 为什么我不能在 Angular 的 Leaflet Map 中使用 TimeDimension 插件?
- r - 用于将数据框中的字符数据转换为数字的 for 循环
- android - 通知调度
- scala - Spark - 将所有时间戳列转换为特定日期格式
- python - 将 dtype(O) 和 'float64' 数组合并到数据框时,项目数量错误且传递值的形状不匹配
- python - 如何在 Pyqt5 中处理新窗口(Qwidet)?
- variables - Netlogo 变量作为 txt (csv) 文件
- angular - 如何将 Mat UI 添加到 Angular 中的子组件?
- java - 查询不够深入?
- javascript - 从 setInterval 函数调用 handleSubmit 事件后获取空状态