Search code examples
iosswiftaudiokit

Audiokit plot waveform in going out of the View


I was testing Microphone Analysis example provided in audiokit repo. I have noticed that the plot drawing waveform out of its view. is there any solution to fix this ?

enter image description here


Solution

  • Its just a UIView right, so you should be able clipToBounds:

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