TimerSetupController

class TimerSetupController : A_TimerSetPickerController

This is the view controller for the main timer settings screen.

  • The timer mode segmented controller

    Declaration

    Swift

    @IBOutlet
    weak var timerModeSegmentedSwitch: UISegmentedControl!
  • The container for the podium mode controls

    Declaration

    Swift

    @IBOutlet
    weak var podiumModeContainerView: UIView!
  • The label for the warning threshold picker

    Declaration

    Swift

    @IBOutlet
    weak var warningThresholdLabel: UILabel!
  • The picker for the warning threshold time

    Declaration

    Swift

    @IBOutlet
    weak var warningThresholdTimePicker: UIPickerView!
  • The label for the final threshold picker

    Declaration

    Swift

    @IBOutlet
    weak var finalThresholdLabel: UILabel!
  • The final threshold picker

    Declaration

    Swift

    @IBOutlet
    weak var finalThresholdTimePicker: UIPickerView!
  • The container for the color selection picker

    Declaration

    Swift

    @IBOutlet
    weak var colorPickerContainerView: UIView!
  • The picker for selecting a color theme

    Declaration

    Swift

    @IBOutlet
    weak var colorThemePicker: UIPickerView!
  • The constraint that pushes the podium mode stuff below the color picker

    Declaration

    Swift

    @IBOutlet
    weak var podiumModeItemsConstraint: NSLayoutConstraint!
  • The dismiss/done button

    Declaration

    Swift

    @IBOutlet
    weak var doneButton: UIButton!
  • The setup button that brings in the alarm settings screen

    Declaration

    Swift

    @IBOutlet
    weak var alarmSetupButton: TimerSoundModeButton!
  • The label for the color display

    Declaration

    Swift

    @IBOutlet
    weak var colorDisplayLabel: UILabel!
  • This just sets up the picker views to the current settings

    Declaration

    Swift

    func setUpPickerViews()
  • Called when the view will appear.

    Declaration

    Swift

    override func viewWillAppear(_ animated: Bool)
  • Called when the view is about to lay out its subviews. We use it to set the alarm setup button.

    Declaration

    Swift

    override func viewDidLayoutSubviews()
  • Called when the view will disappear.

    Declaration

    Swift

    override func viewWillDisappear(_ animated: Bool)
  • Called when we are about to bring in the setup controller.

    Declaration

    Swift

    override func prepare(for segue: UIStoryboardSegue, sender: Any?)
  • Called when the mode segmented control changes

    Declaration

    Swift

    @IBAction
    func modeSegmentedControlChanged(_ sender: UISegmentedControl)

    Parameters

    sender

    ignored

  • Called when the done button is hit.

    Declaration

    Swift

    @IBAction
    func doneButtonHit(_: Any! = nil)
  • This method adds all the accessibility stuff.

    Declaration

    Swift

    override func addAccessibilityStuff()
  • Declaration

    Swift

    override func numberOfComponents(in pickerView: UIPickerView) -> Int
  • Declaration

    Swift

    override func pickerView(_ pickerView: UIPickerView, numberOfRowsInComponent component: Int) -> Int
  • Declaration

    Swift

    override func pickerView(_ pickerView: UIPickerView, rowHeightForComponent component: Int) -> CGFloat

    Parameters

    pickerView

    The UIPickerView calling this

    rowHeightForComponent

    The 0-based index of the component.

    Return Value

    the height, in display units, of the referenced picker component rows

  • Declaration

    Swift

    override func pickerView(_ pickerView: UIPickerView, widthForComponent component: Int) -> CGFloat

    Parameters

    pickerView

    The UIPickerView calling this

    widthForComponent

    The 0-based index of the component.

    Return Value

    the width, in display units, of the referenced picker component

  • Declaration

    Swift

    override func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView

    Parameters

    pickerView

    The UIPickerView calling this

    viewForRow

    The 0-based index of the row.

    forComponent

    The 0-based index of the component.

    reusing

    Any view being reused (ignored)

    Return Value

    a UIView, containing the picker cell.

  • This is called when a picker row is selected, and sets the value for that picker.

    Declaration

    Swift

    func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int)

    Parameters

    inPickerView

    The UIPickerView being queried.

    inRow

    The 0-based row index being selected.

    inComponent

    The 0-based component index being selected.

  • Declaration

    Swift

    override func pickerView(_ inPickerView: UIPickerView, accessibilityLabelForComponent inComponent: Int) -> String?

    Parameters

    accessibilityLabelForComponent

    The 0-based index of the component.

    Return Value

    The accessibility label for the given component.