FDWaveformView
FDWaveformView is an easy way to display an audio waveform in your app. It is a nice visualization to show a playing audio file or to select a position in a file.
Usage
To use it, add an FDWaveformView
using Interface Builder or programmatically and then just load your audio as per this example. Note: if your audio file does not have file extension, see this SO question.
Features
Set play progress to highlight part of the waveform:
Zoom in to show only part of the waveform, of course, zooming in will smoothly re-render to show progressively more detail:
Enable gestures for zooming in, panning around or scrubbing:
Supports animation for changing properties:
Creates antialiased waveforms by drawing more pixels than are seen on screen. Also, if you resize me (autolayout) I will render more detail if necessary to avoid pixelation.
Supports iOS8+ and Swift 3.
Includes unit tests which run successfully using Travis CI.
Installation
Add this to your project using Swift Package Manager. In Xcode that is simply: File > Swift Packages > Add Package Dependency... and you're done. Alternative installations options are shown below for legacy projects.