MetadataQueryMonitor

public class MetadataQueryMonitor : BaseNotificationMonitor

A MetadataQueryMonitor instance monitors a metadata query for changes to its results.

  • Encapsulates changes to the results of the metadata query.

    See more

    Declaration

    Swift

    public enum Event
  • Encapsulates information associated with a metadata query monitor event.

    See more

    Declaration

    Swift

    public struct Info
  • Specifies which events to monitor.

    See more

    Declaration

    Swift

    public struct Options : OptionSet
  • Initializes a new MetadataQueryMonitor.

    Declaration

    Swift

    public init(query: NSMetadataQuery,
                options: Options = .all,
                queue: OperationQueue = .main,
                handler: @escaping (Event) -> Void)

    Parameters

    query

    The metadata query to monitor.

    options

    The options that specify which events to monitor. By default, all events are monitored.

    queue

    The operation queue on which the handler executes. By default, the main operation queue is used.

    handler

    The handler to call when the results of the metadata query change.

  • The metadata query being monitored.

    Declaration

    Swift

    public let query: NSMetadataQuery
  • Declaration

    Swift

    override public func addNotificationObservers()