bastienFalcou / SoundWave

Illustrate your sound waves on the fly 🚀
MIT License
596 stars 93 forks source link

Add `meteringLevelBarSingleStick` design option. #41

Closed HanSJin closed 5 years ago

HanSJin commented 5 years ago

Hi. @bastienFalcou . We discussed about removing the middle lines on the level-meter bar in issue40. So I create PR about this.

The contents of this PR are as follows.

First, I added design option meteringLevelBarSingleStick.

@IBInspectable public var meteringLevelBarSingleStick: Bool = false {
    didSet {
        self.setNeedsDisplay()
    }
}

Second, I added LevelBarType enum that determine shapes of level-meter bar.

private enum LevelBarType {
    case upper
    case lower
    case single
}

Last, I attach the sample gif files.

ezgif com-resize Original sample.

ezgif com-resize-2 After audioVisualizationView.meteringLevelBarSingleStick = true.