AccelerometerMonitor
public class AccelerometerMonitor : BaseMonitor
An AccelerometerMonitor instance monitors the device’s accelerometer
for periodic raw measurements of the acceleration along the three
spatial axes.
-
Encapsulates updates to the measurement of the acceleration along the three spatial axes.
See moreDeclaration
Swift
public enum Event -
Encapsulates the measurement of the acceleration along the three spatial axes at a moment of time.
See moreDeclaration
Swift
public enum Info -
Initializes a new
AccelerometerMonitor.Declaration
Swift
public init(interval: TimeInterval, queue: OperationQueue, handler: @escaping (Event) -> Void)Parameters
intervalThe interval, in seconds, for providing acceleration measurements to the handler.
queueThe operation queue on which the handler executes. Because the events might arrive at a high rate, using the main operation queue is not recommended.
handlerThe handler to call periodically when a new acceleration measurement is available.
-
The latest acceleration measurement available.
Declaration
Swift
public var info: Info { get } -
A Boolean value indicating whether an accelerometer is available on the device.
Declaration
Swift
public var isAvailable: Bool { get } -
Declaration
Swift
override public func cleanupMonitor() -
Declaration
Swift
override public func configureMonitor()
View on GitHub
Install in Dash
AccelerometerMonitor Class Reference