iOS / Swift Integration
Last updated
Was this helpful?
Was this helpful?
// with Swift Concurrency
Task { @MainActor in
imageView.image = try await removeBackground(of: yourImage)
}
// without Swift Concurrency
removeBackground(of: yourImage) { result in
switch result {
case let .success(backgroundRemoved):
imageView.image = backgroundRemoved
case let .failure(error):
// handle the `error`
}
}