Last active
June 16, 2019 18:55
-
-
Save tanmayb123/b6452924864cd65b421c02654f63f63c to your computer and use it in GitHub Desktop.
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
VStack(alignment: .leading) { | |
Text("Hello World") | |
.font(.largeTitle) | |
.bold() | |
Text("This is my test app.") | |
} | |
.offset(x: stackLocation.x, y: stackLocation.y) | |
.gesture(DragGesture() | |
.onChanged { | |
self.stackLocation = $0.location | |
} | |
.onEnded { _ in | |
self.stackLocation = .zero | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment