Classes

The following classes are available globally.

Main Class

  • This is the view class for each alarm button. It is a button with a label in it. The label contains the alarm time and state.

    It has a pulsing “snore” for sleeping.

    See more

    Declaration

    Swift

    class TheBestClockAlarmView : UIControl
  • This is a special control that is normally invisible, and appears when the user starts a vertical pan. We use this to act as a brigthness slider for the clock. The top is the brightest, the bottom is the darkest. The view is updated with the current color from the main controller as it is panned.

    See more

    Declaration

    Swift

    @IBDesignable
    class TheBestClockVerticalBrightnessSliderView : UIControl
  • Declaration

    Swift

    @UIApplicationMain
    class TheBestClockAppDelegate : UIResponder, UIApplicationDelegate

Alarm Class

Prefs Class

Main Class

  • The entire app is basically handled by this one big fat View Controller. The idea is that users don’t leave the context to do their settings.

    There are two “screens” that appear: The Appearance Editor (font, color), and the Alarm Editor (alarm time, activation, sound). These are actually hidden screens that appear over the main display screen.

    Yeah, it’s a big ugly mess. Read the README to find out why the app is configured this way.

    See more

    Declaration

    Swift

    class MainScreenViewController : UIViewController, UIPickerViewDelegate, UIPickerViewDataSource, TheBestClockAlarmViewDelegate
    extension MainScreenViewController: RVS_BasicGCDTimerDelegate
  • This is a simple ViewController that manages the only other view controller in the app: The about box.

    See more

    Declaration

    Swift

    class TheBestClockAboutScreenViewController : UIViewController
  • This is really just a placeholder. It does nothing but create a namespace.

    Declaration

    Swift

    class TheBestClockMainDisplayView : UIView