EqualizerTableViewCell

class EqualizerTableViewCell: GeneralUITableViewCell

Custom GeneralUITableViewCell made for the EqualizerTableView. These cells contain VerticalSlider objects that allow the user to control gain on different frequencies for an equalizer.

  • A StackView that contains 7 VerticalSlider objects.

    Declaration

    Swift

    @IBOutlet weak var sliderStackView: UIStackView!
  • A StackView that contains 7 GeneralUILabel objects.

    Declaration

    Swift

    @IBOutlet weak var labelStackView: UIStackView!
  • row

    This property gets set by each cell’s parent GeneralUITableView. When it gets set, the cell decides how to label the VerticalSlider objects and what color they will be. Calls updateSelf.

    Declaration

    Swift

    var row: Int?
  • The section index for this cell in the table view, representing the audio channel (0 = left, 1 = right). This property is used in conjunction with row to calculate the correct index into the user's equalizer data array when loading saved gain values. The calculation follows the pattern: - For highs (row 0): index = 7 + i + (section * 14) where i is slider position 0-6 - For lows (row 1): index = i + (section * 14) where i is slider position 0-6 - Note: Must be set by the parent table view before cell configuration - Important: Valid values are 0 (left channel) or 1 (right channel)

    Declaration

    Swift

    class EqualizerTableViewCell: GeneralUITableViewCell
  • Sets the font for all GeneralUILabel objects. Also adds a target to each VerticalSlider that calls EqualizerViewController.updateGains which results in the equalizers pulling data from the VerticalSlider objects to set the different frequency’s gain levels.

    Declaration

    Swift

    override func awakeFromNib()
  • This function is invoked when row gets set by the parent GeneralUITableView. It sets the tint color for the VerticalSlider objects as well as the text for each GeneralUILabel based on the row value.

    Declaration

    Swift

    func updateSelf()