Skip to content

Commit

Permalink
Merge pull request #200 from Niko-r/patch-1
Browse files Browse the repository at this point in the history
Allow build for Xcode versions prior Xcode 12
  • Loading branch information
Coeur authored Oct 19, 2020
2 parents 2c6e9fc + 60e0718 commit 0fca711
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/ToastView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ open class ToastView: UIView {
case .pad: return 60
case .tv: return 90
case .carPlay: return 30
#if compiler(>=5.3)
case .mac: return 60
#endif
// default values
case .unspecified: fallthrough
@unknown default: return 30
Expand All @@ -67,7 +69,9 @@ open class ToastView: UIView {
case .pad: return 40
case .tv: return 60
case .carPlay: return 20
#if compiler(>=5.3)
case .mac: return 40
#endif
// default values
case .unspecified: fallthrough
@unknown default: return 20
Expand Down Expand Up @@ -134,7 +138,9 @@ open class ToastView: UIView {
case .pad: return .systemFont(ofSize: 16)
case .tv: return .systemFont(ofSize: 20)
case .carPlay: return .systemFont(ofSize: 12)
#if compiler(>=5.3)
case .mac: return .systemFont(ofSize: 16)
#endif
// default values
case .unspecified: fallthrough
@unknown default: return .systemFont(ofSize: 12)
Expand Down

0 comments on commit 0fca711

Please sign in to comment.