Last active
August 20, 2020 13:56
-
-
Save hirauchg/18f820355b5454852b7cf5d8547a662d to your computer and use it in GitHub Desktop.
他のViewのイベントから画面遷移
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 FirstView: View { | |
@State var flug: Bool = false | |
var body: some View { | |
NavigationView { | |
VStack { | |
NavigationLink(destination: SecondView(), isActive: $flug) { | |
EmptyView() | |
} | |
Button("ボタン") { | |
self.flug = true | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment