Audiokit 出 View 时的 plot 波形

Audiokit plot waveform in going out of the View

我正在测试 audiokit 存储库中提供的麦克风分析示例。 我注意到绘图波形超出了它的视野。 有解决办法吗?

它只是一个 UIView 吧,所以你应该可以 clipToBounds:

https://developer.apple.com/documentation/uikit/uiview/1622415-clipstobounds