mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 09:41:02 +00:00
Fix Catalyst build
This commit is contained in:
parent
ce3e2d2344
commit
904cd3dbd7
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue