Skip to content

Commit

Permalink
Fix ControlSize.extraLarge not available for Xcode lower than 15 (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itaybre authored Dec 5, 2023
1 parent bf6f133 commit c24472e
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Sources/Pow/Infrastructure/AngleControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,17 @@ struct AngleControl<Label: View>: View {
}

private var size: CGFloat {
switch controlSize {
case .mini: return 32
case .small: return 38
case .regular: return 44
case .large: return 54
case .extraLarge: return 54
@unknown default: return 44
}
switch controlSize {
case .mini: return 32
case .small: return 38
case .regular: return 44
case .large: return 54
#if compiler(>=5.9)
// ControlSize.extraLarge is only available from Xcode 15 which comes with Swift 5.9
case .extraLarge: return 54
#endif
@unknown default: return 44
}
}

var body: some View {
Expand Down

0 comments on commit c24472e

Please sign in to comment.