4 struct OutputSettings: View {
6 @CloudStorage("outputFormats") var outputFormats: OutputFormatSetting = .all
7 @CloudStorage("frameRate") var frameRate = 10.0
9 private var anyState: String { "\(outputFormats), \(frameRate)" }
13 VStack (alignment: .center) {
14 LabeledContent("GIF Framerate") {
15 Slider(value: $frameRate, in: 4...10, step: 1) {
16 Text("\(Int(frameRate))").font(.body).frame(width: 24)
17 } minimumValueLabel: {
19 } maximumValueLabel: {
23 Picker(selection: $outputFormats, label: Text("Output Formats").font(.headline)) {
25 .tag(OutputFormatSetting.all)
26 .padding(.horizontal, 4.0)
27 .padding(.vertical, 2.0)
29 .tag(OutputFormatSetting.gifOnly)
30 .padding(.horizontal, 4.0)
31 .padding(.vertical, 2.0)
34 .tag(OutputFormatSetting.mp4Only)
35 .padding(.horizontal, 4.0)
36 .padding(.vertical, 2.0)
37 }.pickerStyle(.radioGroup)
41 .onChange(of: anyState) { _ in
42 NotificationCenter.default.post(name: .reloadConfiguration, object: nil, userInfo: nil)