AnnotationSetStore
Swift
@objc(PSPDFAnnotationSetStore)
public protocol AnnotationSetStore
A protocol implemented by types that can store annotation sets somewhere and load them later. Annotation set stores are used for the Saved Annotations feature.
PSPDF_EXPORT(PSPDFAnnotationSetStore)
-
Get the annotation sets currently stored in the store.
Declaration
Swift
@objc(fetchAnnotationSetsWithError:) func fetchAnnotationSets() throws -> [AnnotationSet]
Return Value
An array of annotation sets.
-
Set the annotation sets in the store.
Declaration
Swift
func setAnnotationSets(_ newValue: [AnnotationSet]) throws
Parameters
newValue
The new array of annotation sets.
-
All annotation sets currently stored in the store.
Warning
If an error occurs when retrieving the stored annotation sets, it will be logged to the console and an empty array will be returned. When storing fails, the logged message is the only indication that the operation failed. Therefore, it is recommended to use the throwing functions instead.Declaration
Swift
@available(*, deprecated, message: "Deprecated in PSPDFKit 11.3 for iOS. Use `fetchAnnotationSets(﹚` and `setAnnotationSets(_:﹚` instead.") var annotationSets: [AnnotationSet] { get set }
-
modifyAnnotationSets(_:
Extension method) Modify the annotation sets in the store.
Declaration
Swift
@discardableResult public func modifyAnnotationSets<Result>(_ modify: (inout [AnnotationSet]) -> Result) throws -> Result
Parameters
modify
A closure in which the array of annotation sets can be modified in place.
Return Value
The result of the
modify
closure, if any.