dmrschmidt / DSWaveformImage

Generate waveform images from audio files on iOS, macOS & visionOS in Swift. Native SwiftUI & UIKit views.
MIT License
978 stars 109 forks source link

WaveForm Flickering #84

Closed ReimannSamuel closed 7 months ago

ReimannSamuel commented 8 months ago

Im using the Waveform in tablecell and it WaveForm is getting updated on every reload. Is there any way to overCome this issue

dmrschmidt commented 8 months ago

The first thing that I would suggest is to use WaveformImageDrawer directly instead. WaveformImageView is designed to adapt to frame changes but not in an optimized way.

If you do want to keep using a view, I would suggest to adapt your own WaveformImageView. I assume layoutSubviews may be the culprit in your use case, so it could be adapted to whatever your situation requires.

dmrschmidt commented 7 months ago

Closing this for now as there is no plan to work on the UIKit variants unless necessary. If you do have further questions, feel free to re-open this issue or another one any time.