RVS_AmbiaMara_Settings

class RVS_AmbiaMara_Settings : RVS_PersistentPrefs

This class stores our timer settings as app persistent storage.

Individual Timer State

  • This struct contains the current settings for the timer.

    See more

    Declaration

    Swift

    struct TimerSettings

RVS_PersistentPrefs Conformance

  • This is an enumeration that will list the prefs keys for us.

    See more

    Declaration

    Swift

    enum Keys : String
  • The keys (for determining storage).

    Declaration

    Swift

    override var keys: [String] { get }

Class Computed Properties

  • Declaration

    Swift

    class var soundURIs: [String] { get }

    Return Value

    An Array of Strings, representing the URIs of the sounds avaialable.

Instance Computed Properties

  • The timers, as TimerSettings instances. The Array is sorted by the duration of the timer Start times.

    Declaration

    Swift

    var timers: [TimerSettings] { get set }
  • ids

    This returns the timer IDs, as an Array. This is how we deal with ordering the timers, since they are stored as a Dictionary.

    Declaration

    Swift

    var ids: [String] { get }
  • The number of timers.

    Declaration

    Swift

    var numberOfTimers: Int { get }
  • The current index into the Array of timers (so 0-based), of the currently selected timer.

    Declaration

    Swift

    var currentTimerIndex: Int { get set }
  • The ID of the currently selected timer.

    Declaration

    Swift

    var currentTimerID: String { get set }
  • If true, then the alarm will use haptics (vibration), in devices that support it.

    Declaration

    Swift

    var useVibrate: Bool { get set }
  • The alarm audio mode. If true, then there will be an audible alarm.

    Declaration

    Swift

    var alarmMode: Bool { get set }
  • The selected sound, for an alarm. This is a 0-based index.

    Declaration

    Swift

    var selectedSoundIndex: Int { get set }
  • If this is true, then going into the running timer screen starts the timer immediately. If false, then it starts as paused.

    Declaration

    Swift

    var startTimerImmediately: Bool { get set }
  • If this is true, then the toolbar is shown at the top of the running timer.

    Declaration

    Swift

    var displayToolbar: Bool { get set }
  • If this is true, then the running display will be three “traffic lights,” instead of a digital display.

    Declaration

    Swift

    var stoplightMode: Bool { get set }
  • If this is true, then the toolbar (if in displayToolbar mode) will fade, after a few seconds of inactivity.

    Declaration

    Swift

    var autoHideToolbar: Bool { get set }
  • The currently selected timer instance.

    Declaration

    Swift

    var currentTimer: TimerSettings { get set }

Instance Methods

  • Remove the timer from storage.

    Declaration

    Swift

    func remove(timer inTimer: TimerSettings)

    Parameters

    timer

    The timer to be removed. Upon return, the timer is no longer stored in persistent prefs.

  • Add the timer to storage. If the timer is already in storage, it is updated.

    Declaration

    Swift

    func add(timer inTimer: TimerSettings = TimerSettings(), andSelect inAndSelect: Bool = false)

    Parameters

    timer

    The timer to be added.

    andSelect

    If true, then the current selection will move to this timer. Default is false.