AudioKit / Waveform

GPU accelerated waveform view
MIT License
185 stars 13 forks source link

Waveform in UIHostingController in UIScrollView gets cut off #7

Open willswinson opened 2 months ago

willswinson commented 2 months ago

macOS Version(s) Used to Build

macOS 13 Ventura

Xcode Version(s)

Xcode 14

Description

I have a Waveform inside a UIHostingController to work with UIKit. That UIHostingController view is inside a UIScrollView.

There seems to be a bug where if you scroll away from the Waveform (to where its not visibile anymore), and then scroll back to it, a portion of the beginning of the wave gets removed or there is padding added.

If I debug the views, the UIHostingController is the correct size, but the Waveform view it contains gets some kind of padding to the left side (horizontal scrolling). If I rebuild the views, it corrects itself. It only happens when I scroll the view back to the visible area.

Crash Logs, Screenshots or Other Attachments (if applicable)

No response