Comments (6)
Working Perfectly.
Thanks for the quick response.
from dswaveformimage.
Current solution for me is to
@State var statename = false;
WaveformLiveCanvas(samples: [],configuration: liveConfiguration,
renderer: LinearWaveformRenderer(),
shouldDrawSilencePadding: statename).onAppear{
statename = true;
}
Still this would give error inside a List {} theirfore switched to scrollview. Could have tried LazyVStack but currently scrollview is fine.
from dswaveformimage.
Hey @ShivamRawat0l,
I took a quick look at this myself and I can reproduce the behavior you describe.
I cannot yet exactly say why, but it does seem to be a bug in the state handling of WaveformLiveCanvas.
I’ll look into this further, but can’t promise when I may have found a fix for this.
So in the meantime your workaround will have to do. IMHO that looks like a perfectly fine and even simpler approach anyway, no?
Out of curiosity - not sure whether this is related to the library at all - what error are you getting with List?
from dswaveformimage.
Hey @ShivamRawat0l,
I took a quick look at this myself and I can reproduce the behavior you describe.
I cannot yet exactly say why, but it does seem to be a bug in the state handling of WaveformLiveCanvas.
I’ll look into this further, but can’t promise when I may have found a fix for this.
So in the meantime your workaround will have to do. IMHO that looks like a perfectly fine and even simpler approach anyway, no?
Out of curiosity - not sure whether this is related to the library at all - what error are you getting with List?
WIth
@State var statename = false;
WaveformLiveCanvas(samples: [],configuration: liveConfiguration,
renderer: LinearWaveformRenderer(),
shouldDrawSilencePadding: statename).onAppear{
statename = true;
}
I am putting statename to true inside onAppear. And in List onAppear and onDisappear are called regularly as we scroll through.
So went with ScrollView only for the meantime.
from dswaveformimage.
Ah ok, I think I get what you mean.
In any case, I think I've found and fixed the issue.
If I'm completely honest with you, I don't 100% understand why SwiftUI behaves the way it does here. Something about @StateObject
that behaves different to what I'd expect.
Update to 13.0.1 and the issue should be fixed. Please let me know if it does / doesn't.
from dswaveformimage.
Ah ok, I think I get what you mean.
In any case, I think I've found and fixed the issue. If I'm completely honest with you, I don't 100% understand why SwiftUI behaves the way it does here. Something about
@StateObject
that behaves different to what I'd expect.Update to 13.0.1 and the issue should be fixed. Please let me know if it does / doesn't.
Wow thanks that was quick. Ill check and update the ticket :)
from dswaveformimage.
Related Issues (20)
- Waveform is changing every time I scroll my chat message's table view how to manage it ? HOT 3
- Two identical waveform views don't always line up HOT 3
- WaveForm for the http local file without downloading HOT 2
- Wavegeneration stopped when scroll tableview HOT 3
- Dampening vs. damping HOT 1
- Left to right instead of right to left HOT 2
- Wavefrom form Data in SwiftUI HOT 7
- WaveformLiveView for Local Path HOT 13
- There's many different ways this could be achieved. HOT 3
- Fatal error HOT 3
- Current amplitude HOT 1
- Compile error in Xcode 15 beta. HOT 2
- Missing Pause Functionality HOT 1
- -11800 Error code when generation samples on iOS 17 beta HOT 10
- mp3 File not support HOT 8
- xcode 15 not support. Stored properties cannot be marked unavailable with '@available' HOT 1
- Striped style with gradient HOT 2
- Stored properties cannot be marked unavailable with '@available' HOT 3
- Stored properties cannot be marked unavailable with '@available' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dswaveformimage.