Last active
April 12, 2022 21:17
-
-
Save smrfeld/d607d68f653140625efa783860beac28 to your computer and use it in GitHub Desktop.
Simple circle content view
This file contains hidden or 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
| import SwiftUI | |
| struct ContentView: View { | |
| @State var xpos: CGFloat = 400 | |
| @State var ypos: CGFloat = 200 | |
| var body: some View { | |
| ZStack { | |
| Circle() | |
| .frame(width: 50, height: 50) | |
| .foregroundColor(.blue) | |
| .position(x: xpos, y: ypos) | |
| } | |
| .frame(width: 800, height: 800) | |
| .background(.white) | |
| } | |
| } | |
| struct ContentView_Previews: PreviewProvider { | |
| static var previews: some View { | |
| ContentView() | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment