Skip to content

Commit

Permalink
Merge pull request #16 from andrey-pagin/main
Browse files Browse the repository at this point in the history
Fix the measureSize function bug
  • Loading branch information
c-villain authored May 13, 2023
2 parents 418a14b + 44fc025 commit 39c6d7f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ struct SizePreferenceKey: PreferenceKey {

struct MeasureSizeModifier: ViewModifier {
func body(content: Content) -> some View {
content.background(GeometryReader { geometry in
content.overlay(GeometryReader { geometry in
Color.clear.preference(key: SizePreferenceKey.self,
value: geometry.size)
})
Expand Down

0 comments on commit 39c6d7f

Please sign in to comment.