Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on sample code "Trailing closure passed to parameter of type 'CGFloat?' that does not accept a closure" #35

Closed
fabien79 opened this issue May 25, 2022 · 1 comment

Comments

@fabien79
Copy link

I would like to draw an image based on a mp3
I Follow install your request and copy past your example

let waveformImageDrawer = WaveformImageDrawer()
let audioURL = Bundle.main.url(forResource: "example_sound", withExtension: "m4a")!
waveformImageDrawer.waveformImage(fromAudioAt: audioURL, with: .init(
size: topWaveformView.bounds.size,
style: .filled(UIColor.black),
position: .top) { image in
// need to jump back to main queue
DispatchQueue.main.async {
self.topWaveformView.image = image
}
})

but i've got this error on line 6 on the "{":
"Trailing closure passed to parameter of type 'CGFloat?' that does not accept a closure"

Can you give me advice to fix the problem please ?
Thanks in advance

@fabien79
Copy link
Author

I test the Example code in the project, it's working, i don't understand.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant