exyte / ScalingHeaderScrollView

A scroll view with a sticky header which shrinks as you scroll. Written with SwiftUI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Modifying state during view update, this will cause undefined behavior.

lieanquintos opened this issue · comments

Getting this error in this code:

scrollViewDelegate.didScroll = { self.progress = getCollapseProgress() }

Hey @lieanquintos, sorry for the super late response, but could you please describe in more details how you are getting this error? I launched all the examples, but I don't see it.

@f3dm76 using Xcode 14.2 I'm seeing what I believe is essentially the same error/warning on the BookingScreen example. When I open the example app and click "Booking Screen", Xcode immediately shows two warnings that say Publishing changes from within view updates is not allowed, this will cause undefined behavior.

Hey @scottymack, that is a problem inside the example itself though, also it's a known issue with map https://developer.apple.com/forums/thread/718697, not with scrollViewDelegate.didScroll = { self.progress = getCollapseProgress() } So I'm closing this one, please feel free to reopen if the original issue comes back