Fix Catalyst build

This commit is contained in:
Thomas Ricouard 2024-09-06 07:53:01 +02:00
parent ce3e2d2344
commit 904cd3dbd7

View file

@ -5,11 +5,15 @@ import SwiftUI
public extension View { public extension View {
func addTranslateView(isPresented: Binding<Bool>, text: String) -> some View { func addTranslateView(isPresented: Binding<Bool>, text: String) -> some View {
#if targetEnvironment(macCatalyst)
return self
#else
if #available(iOS 17.4, *) { if #available(iOS 17.4, *) {
return self.translationPresentation(isPresented: isPresented, text: text) return self.translationPresentation(isPresented: isPresented, text: text)
} else { } else {
return self return self
} }
#endif
} }
} }
#endif #endif