Skip to content

CLASS

SPCalibrationViewController

open class SPCalibrationViewController: SPViewController

Displays a single calibration target, that when activated starts calibration in the Obital Framework. When calibration is complete, CalibratedPoint becomes available in the NotificationCenter methods.

Properties

bounds

public var bounds = CGRect.zero

isPathCompleted

public var isPathCompleted = false

calibrationDelegate

weak public var calibrationDelegate: SPCalibrationViewControllerDelegate?

Methods

viewDidLoad()

open override func viewDidLoad()

numberOfSections()

override public func numberOfSections() -> Int

numberOfTargets(inSection:)

override public func numberOfTargets(inSection index: Int) -> Int

Parameters

Name Description
index The section index

configure(section:)

override public func configure(section: Section) -> Section

configure(target:inSection:atIndex:)

open override func configure(target: TargetNode, inSection section: Int, atIndex index: Int) -> TargetNode

Parameters

Name Description
cell The cell to be configured
atIndex The index of the cell

didActivate(target:inSection:atIndex:)

open override func didActivate(target: TargetNode, inSection sectionIndex: Int, atIndex targetIndex: Int)

Parameters

Name Description
cell The cell that has been activated (contains a target node)
index The index of the target that was activated.

progressDidChange(to:)

open func progressDidChange(to progress: CalibrationProgress)

recalibrate()

public func recalibrate()

viewWillTransition(to:with:)

open override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator)

Parameters

Name Description
size The new size of the view
coordinator sender