Skip to content

Commit

Permalink
fix iOS 13 support
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanLipnik committed Apr 30, 2022
1 parent df3c567 commit 96b9aed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/UIOnboarding/Views/UIOnboardingButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ final class UIOnboardingButton: UIButton {
translatesAutoresizingMaskIntoConstraints = false
isAccessibilityElement = true

isPointerInteractionEnabled = true
if #available(iOS 13.4, *) {
isPointerInteractionEnabled = true
}


if #available(iOS 15.0, *) {
titleLabel?.font = UIFontMetrics.default.scaledFont(for: .systemFont(ofSize: traitCollection.horizontalSizeClass == .regular ? 19 : 17, weight: .bold))
// titleLabel?.maximumContentSizeCategory = UIScreenType.isiPhone6s || UIScreenType.isiPhoneSE ? .extraLarge : .accessibilityExtraLarge
// titleLabel?.maximumContentSizeCategory = UIScreenType.isiPhone6s || UIScreenType.isiPhoneSE ? .extraLarge : .accessibilityExtraLarge
} else {
titleLabel?.font = UIFontMetrics.default.scaledFont(for: .preferredFont(forTextStyle: .headline), maximumPointSize: 21)
}
Expand Down

0 comments on commit 96b9aed

Please sign in to comment.