Created
June 9, 2020 12:54
-
-
Save arkivanov/90f3a4cd3befbb0c1fd3b324a931a1b9 to your computer and use it in GitHub Desktop.
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
| struct KittenSwiftView: View { | |
| @ObservedObject var proxy: KittenViewProxy | |
| var body: some View { | |
| NavigationView { | |
| content | |
| .navigationBarTitle("Kittens KMP Sample") | |
| .navigationBarItems( | |
| leading: ActivityIndicator(isAnimating: self.proxy.model?.isLoading ?? false, style: .medium), | |
| trailing: Button("Refresh") { | |
| self.proxy.dispatch(event: KittenViewEvent.RefreshTriggered()) | |
| } | |
| ) | |
| } | |
| } | |
| private var content: some View { | |
| // Omitted code | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment