Last active
May 29, 2021 04:58
-
-
Save anupamchugh/c434be93ff0a1a3aadcd645ee9ea5344 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
struct ContentView: View { | |
@State var outputImage : UIImage = UIImage(named: "unsplash")! | |
@State var inputImage : UIImage = UIImage(named: "unsplash")! | |
var body: some View { | |
ScrollView{ | |
VStack{ | |
HStack{ | |
Image(uiImage: inputImage) | |
.resizable() | |
.aspectRatio(contentMode: .fit) | |
Spacer() | |
Image(uiImage: outputImage) | |
.resizable() | |
.aspectRatio(contentMode: .fit) | |
} | |
Spacer() | |
Button(action: {runVisionRequest()}, label: { | |
Text("Run Image Segmentation") | |
}) | |
.padding() | |
} | |
} | |
} | |
//.... more here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment