nikstar / VariableBlur

SwiftUI variable blur (progressive blur)
MIT License
86 stars 0 forks source link

App crashes when navigating back between views with VariableBlurViews #3

Closed juanwilliman closed 6 months ago

juanwilliman commented 7 months ago

If I have a root view with a VariableBlurView and navigate to another view with a VariableBlurView, and then navigate back to the previous view, the app crashes with an error on the main class such as: Thread 1: EXC_BAD_ACCESS (code=1, address=0x4d83566f0)

In my case, I want to build an app where I use this blur as a status bar and bottom bar (similar to a tab bar) in every screen, so this error occurs all the time. This is the best and cleanest implementation I've come across, do you have any clue where it might be failing?

Cheers!

nikstar commented 7 months ago

Hi! Can't say without a sample project that reproduces this crash, I haven't encountered it. Possible that UIKit tries to reuse underlying translucent layer, I guess?

Does this implementation also crash? https://github.com/aheze/VariableBlurView

juanwilliman commented 7 months ago

It works! I had to tweak it a little bit so it resembles your implementation and fix a few issues, but now it works as expected. Thank you very much!