AKPresetLoaderView

open class AKPresetLoaderView: UIView

Preset view scoller

  • Text to display as a label

    Declaration

    Swift

    open var label = "Preset"
  • The presets to scroll through

    Declaration

    Swift

    open var presets = [String]()
  • Function to call when the preset is changed

    Declaration

    Swift

    open var callback: (String) -> Void
  • Font size

    Declaration

    Swift

    @IBInspectable open var fontSize: CGFloat = 24
  • Font

    Declaration

    Swift

    @IBInspectable open var font: UIFont = UIFont.boldSystemFont(ofSize: 24)
  • Initialize the preset loader view

    Declaration

    Swift

    public init(presets: [String],
                    frame: CGRect = CGRect(x: 0, y: 0, width: 440, height: 60),
                    font: UIFont = UIFont.boldSystemFont(ofSize: 24),
                    fontSize: CGFloat = 24,
                    initialIndex: Int = 0,
                    callback: @escaping (String) -> Void)
  • Initialize in Interface Builder

    Declaration

    Swift

    required public init?(coder aDecoder: NSCoder)
  • Draw the preset loader

    Declaration

    Swift

    override open func draw(_ rect: CGRect)
  • Handle new touches

    Declaration

    Swift

    override open func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?)
  • Handle moved touches

    Declaration

    Swift

    override open func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?)