如何删除黄色选择突出显示?

问题描述 投票:1回答:1

我正在PDFKit中以编程方式选择文本,点击后2秒钟,所选单词以黄色突出显示,然后消失。

let wordSelection = page?.selectionForWord(at: info.point)
pdfView.setCurrentSelection(wordSelection, animate: true)

对我来说,删除此突出显示或将其替换为.clear颜色将是完美的选择。

ios swift pdf pdfkit
1个回答
0
投票

发现,如果我将animate属性设置为false,它将消失。

pdfView.setCurrentSelection(wordSelection, animate: false)
© www.soinside.com 2019 - 2024. All rights reserved.