File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ Features
2525** Set play progress** to highlight part of the waveform:
2626
2727``` swift
28- self .waveform .progressSamples = self .waveform .totalSamples / 2
28+ self .waveform .highlightedSamples = 0 ..< ( self .waveform .totalSamples / 2 )
2929```
3030
3131<p align =" center " >
@@ -35,8 +35,7 @@ self.waveform.progressSamples = self.waveform.totalSamples / 2
3535** Zoom in** to show only part of the waveform, of course, zooming in will smoothly re-render to show progressively more detail:
3636
3737``` swift
38- self .waveform .zoomStartSamples = 0
39- self .waveform .zoomEndSamples = self .waveform .totalSamples / 4
38+ self .waveform .zoomSamples = 0 ..< (self .waveform .totalSamples / 4 )
4039```
4140
4241<p align =" center " >
@@ -60,7 +59,7 @@ self.waveform.doesAllowScroll = true
6059``` swift
6160UIView.animate (withDuration : 0.3 ) {
6261 let randomNumber = arc4random () % self .waveform .totalSamples
63- self .waveform .progressSamples = randomNumber
62+ self .waveform .highlightedSamples = 0 ..< randomNumber
6463}
6564```
6665
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ open class FDWaveformView: UIView {
106106 }
107107 }
108108
109- /// The color of the highlighted waveform (see `progressSamples `
109+ /// The color of the highlighted waveform (see `highlightedSamples `
110110 @IBInspectable open var progressColor = UIColor . blue {
111111 didSet {
112112 highlightedImage. tintColor = progressColor
You can’t perform that action at this time.
0 commit comments