This commit is contained in:
Casper Zandbergen 2021-01-04 17:34:31 +01:00
parent 5317b3de65
commit a72743ac45
1 changed files with 4 additions and 2 deletions

View File

@ -156,10 +156,12 @@ public struct ScrollViewReader<Content: View>: View {
// https://stackoverflow.com/a/61765994/3019595
}
.introspectScrollView {
if self.proxy.coordinator.scrollView != $0 {
self.proxy.coordinator.scrollView = $0
self.proxy.offset = $0.offsetPublisher
}
}
}
}
// MARK: ScrollViewProxy