mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-05-31 22:58:20 +00:00
16 lines
360 B
Swift
16 lines
360 B
Swift
import SwiftUI
|
|
|
|
#if canImport(_Translation_SwiftUI)
|
|
import Translation
|
|
|
|
extension View {
|
|
public func addTranslateView(isPresented: Binding<Bool>, text: String) -> some View {
|
|
if #available(iOS 17.4, *) {
|
|
return self.translationPresentation(isPresented: isPresented, text: text)
|
|
} else {
|
|
return self
|
|
}
|
|
}
|
|
}
|
|
#endif
|