iOS 14/macOS Big Sur Support

This commit is contained in:
Arkadiusz Fal
2021-11-28 15:37:55 +01:00
parent 696751e07c
commit 5ef89ac9f4
57 changed files with 1147 additions and 813 deletions

View File

@@ -1,15 +1,15 @@
import SwiftUI
struct OpenSettingsButton: View {
@Environment(\.dismiss) private var dismiss
@Environment(\.presentationMode) private var presentationMode
#if !os(macOS)
@EnvironmentObject<NavigationModel> private var navigation
#endif
var body: some View {
Button {
dismiss()
let button = Button {
presentationMode.wrappedValue.dismiss()
#if os(macOS)
NSApp.sendAction(Selector(("showPreferencesWindow:")), to: nil, from: nil)
@@ -19,7 +19,13 @@ struct OpenSettingsButton: View {
} label: {
Label("Open Settings", systemImage: "gearshape.2")
}
.buttonStyle(.borderedProminent)
if #available(iOS 15.0, macOS 12.0, tvOS 15.0, *) {
button
.buttonStyle(.borderedProminent)
} else {
button
}
}
}