更新阅读器功能与示例
This commit is contained in:
@@ -21,6 +21,18 @@ extension RDEPUBReaderController {
|
||||
runtime.clearSelection()
|
||||
}
|
||||
|
||||
/// Displays temporary decorations without mutating annotation persistence.
|
||||
public func setTransientHighlights(_ highlights: [RDEPUBHighlight]) {
|
||||
transientHighlights = highlights
|
||||
refreshVisibleContentPreservingLocation()
|
||||
}
|
||||
|
||||
public func clearTransientHighlights() {
|
||||
guard !transientHighlights.isEmpty else { return }
|
||||
transientHighlights.removeAll()
|
||||
refreshVisibleContentPreservingLocation()
|
||||
}
|
||||
|
||||
public func bookmark(withID id: String) -> RDEPUBBookmark? {
|
||||
runtime.bookmark(withID: id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user