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
StackViewthat contains 7VerticalSliderobjects.Declaration
Swift
@IBOutlet weak var sliderStackView: UIStackView! -
A
StackViewthat contains 7GeneralUILabelobjects.Declaration
Swift
@IBOutlet weak var labelStackView: UIStackView! -
This property gets set by each cell’s parent
GeneralUITableView. When it gets set, the cell decides how to label theVerticalSliderobjects and what color they will be. CallsupdateSelf.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
rowto 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
GeneralUILabelobjects. Also adds a target to eachVerticalSliderthat callsEqualizerViewController.updateGainswhich results in the equalizers pulling data from theVerticalSliderobjects to set the different frequency’s gain levels.Declaration
Swift
override func awakeFromNib() -
This function is invoked when
rowgets set by the parentGeneralUITableView. It sets the tint color for theVerticalSliderobjects as well as the text for eachGeneralUILabelbased on therowvalue.Declaration
Swift
func updateSelf()
View on GitHub
EqualizerTableViewCell Class Reference