Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Last active June 29, 2021 17:38
Show Gist options
  • Save iosdevie/6aa9bbfd19b622ab287a3b4a014b3fa8 to your computer and use it in GitHub Desktop.
Save iosdevie/6aa9bbfd19b622ab287a3b4a014b3fa8 to your computer and use it in GitHub Desktop.
@State var finalOutputImage : UIImage = UIImage(named: "background")!
@State var outputImage : UIImage = UIImage(named: "background")!
@State var inputImage : UIImage = UIImage(named: "sample")!
var body: some View {
VStack{
Image(uiImage: inputImage)
.resizable()
.aspectRatio(contentMode: .fit)
Image(uiImage: outputImage)
.resizable()
.aspectRatio(contentMode: .fit)
Image(uiImage: finalOutputImage)
.resizable()
.aspectRatio(contentMode: .fit)
}.task {
runVisionRequest()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment