Skip to content

Instantly share code, notes, and snippets.

@anupamchugh
Last active May 29, 2021 04:58
Show Gist options
  • Save anupamchugh/c434be93ff0a1a3aadcd645ee9ea5344 to your computer and use it in GitHub Desktop.
Save anupamchugh/c434be93ff0a1a3aadcd645ee9ea5344 to your computer and use it in GitHub Desktop.
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