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(interval: TimeInterval,
                queue: OperationQueue,
                handler: @escaping (Event) -> Void)

    Parameters

    interval

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

    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.

    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 { get }
  • A Boolean value indicating whether a gyroscope is available on the device.

    Declaration

    Swift

    public var isAvailable: Bool { get }
  • Declaration

    Swift

    override public func cleanupMonitor()
  • Declaration

    Swift

    override public func configureMonitor()