GyroscopeMonitor

public class GyroscopeMonitor: BaseMonitor

A GyroscopeMonitor instance monitors the device’s gyroscope for periodic raw measurements of the rotation rate around the three spatial axes.

  • Encapsulates updates to the measurement of the rotation rate around the three spatial axes.

    See more

    Declaration

    Swift

    public enum Event
  • Encapsulates the measurement of the rotation rate around the three spatial axes at a moment of time.

    See more

    Declaration

    Swift

    public enum Info
  • Initializes a new GyroscopeMonitor.

    Declaration

    Swift

    public init(queue: OperationQueue,
                interval: TimeInterval,
                handler: @escaping (Event) -> Void)

    Parameters

    queue

    The operation queue on which the handler executes. Because the events might arrive at a high rate, using the main operation queue is not recommended.

    interval

    The interval, in seconds, for providing rotation rate measurements to the handler.

    handler

    The handler to call periodically when a new rotation rate measurement is available.

  • The latest rotation rate measurement available.

    Declaration

    Swift

    public var info: Info
  • A Boolean value indicating whether a gyroscope is available on the device.

    Declaration

    Swift

    public var isAvailable: Bool
  • Declaration

    Swift

    public override final func cleanupMonitor()
  • Declaration

    Swift

    public override final func configureMonitor()