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 {
func addTranslateView(isPresented: Binding<Bool>, text: String) -> some View {
#if targetEnvironment(macCatalyst)
return self
#else
if #available(iOS 17.4, *) {
return self.translationPresentation(isPresented: isPresented, text: text)
} else {
return self
}
#endif
}
}
#endif