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

Crashes when zoom too far in. No maximum zoom parameter. #93

Open
cormacsugrue opened this issue Apr 19, 2017 · 4 comments
Open

Crashes when zoom too far in. No maximum zoom parameter. #93

cormacsugrue opened this issue Apr 19, 2017 · 4 comments

Comments

@cormacsugrue
Copy link

Hi I noticed a bug where if you continue to zoom into the waveform as far as it will zoom the view crashes. The waveform resets but it is frozen.

I found a fix by surrounding a section of the handlePinchGesture function in a if statement and hard coded a maximum frame value.

desctop screenshot

@fulldecent
Copy link
Owner

You just HAD to zoom that far!

I think this will be fixed with the TODO note. I am very jet lagged (PHL->MNL-DOH->PHL) and didn't want to make refactoring changes in a plane.

BUT I think the long-term solution is #86 Could you please help to take a look at that as it GUARANTEES a range will always be at least one.

@cormacsugrue
Copy link
Author

OK great thanks, I will take a look at that. Should I leave this issue open until it has been resolved by #86 . I'm new to github and swift so apologies if I'm not going about any of this the correct way.

Also I don't know if this place to ask but i'm having difficulty initializing a waveform programmatically. I had success using the outlet as per the example. I'm sure it's something obvious. Any help would be greatly appreciated.

var waveform: FDWaveformView!

override func viewDidLoad() {

waveform.frame = CGRect(x: 80, y: 20, width: 240, height: 128)
let url = samplerAudioFileURLs[SamplerPlayButton.selectedSamplerIndex]
waveform.delegate = self
waveform.audioURL = url
waveform.alpha = 0.0
}

@fulldecent
Copy link
Owner

Welcome.

Yes. This issue needs to be fixed and should stay open under any circumstance until that happens.

Right now your alpha is 0.0 which is going to be REALLY hard to see.

@wykeenjenga
Copy link

wykeenjenga commented Oct 28, 2022

Hey and how can I limit maximum zoo value?

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

3 participants