Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.01 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.01 KB

ios

TranslateView

A SwiftUI view that enables you to properly present a iOS 15 TranslateViewController.

TranslateViewInPad

TranslateViewInPhone

Example

@State private var text: String?

var body: some View {
    Button {
        text = "Hello World"
    } label: {
        Text("translate")
    }
    .translateSheet($item)
}

Installation

The code is packaged as a framework. You can install manually (by copying the files in the Sources directory) or using Swift Package Manager (preferred)

To install using Swift Package Manager, add this to the dependencies section of your Package.swift file:

.package(url: "https://github.com/HDCodePractice/TranslateView.git", .upToNextMinor(from: "1.0.0"))

Note: The package requires iOS v15+