Created
April 2, 2020 07:31
-
-
Save wizard1066/e90becf1d32aea55c91934443eee48fd to your computer and use it in GitHub Desktop.
abgwtpB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct InsideView: View { | |
@Binding var rect: [CGRect] | |
var body: some View { | |
return GeometryReader { geometry in | |
Rectangle() | |
.fill(Color.yellow) | |
.frame(width: 64, height: 32, alignment: .center) | |
.opacity(0.5) | |
.onAppear { | |
self.rect.append(geometry.frame(in: .global)) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment