SCCameraKitDeviceMotionDataProvider

Objective-C

@protocol SCCameraKitDeviceMotionDataProvider <NSObject>

Swift

protocol DeviceMotionDataProvider : NSObjectProtocol

Protocol to provide device motion data and handle starting/updating/stopping

  • Current device motion data

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) CMDeviceMotion *deviceMotion;

    Swift

    var deviceMotion: CMDeviceMotion? { get }
  • Start updating device motion with params

    Declaration

    Objective-C

    - (void)startUpdatingWithParameters:
        (nonnull id<SCCameraKitDeviceMotionParameters>)parameters;

    Swift

    func startUpdating(with parameters: DeviceMotionParameters)

    Parameters

    parameters

    device motion params

  • Stop updating device motion

    Declaration

    Objective-C

    - (void)stopUpdating;

    Swift

    func stopUpdating()