Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit e6f1249

Browse files
committed
Set button title color instead of label tint
1 parent 67c94f6 commit e6f1249

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ final class SubheadlineButton: UIButton {
77
super.traitCollectionDidChange(previousTraitCollection)
88
if previousTraitCollection?.preferredContentSizeCategory != traitCollection.preferredContentSizeCategory {
99
titleLabel?.font = WPStyleGuide.mediumWeightFont(forStyle: .subheadline)
10-
titleLabel?.tintColor = WordPressAuthenticator.shared.style.subheadlineColor
10+
setTitleColor(WordPressAuthenticator.shared.style.subheadlineColor, for: .normal)
1111
}
1212
}
1313
}
@@ -163,7 +163,7 @@ extension WPStyleGuide {
163163
button.titleLabel?.font = font
164164
button.titleLabel?.numberOfLines = 0
165165
button.titleLabel?.lineBreakMode = .byWordWrapping
166-
button.titleLabel?.tintColor = WordPressAuthenticator.shared.style.subheadlineColor
166+
button.setTitleColor(WordPressAuthenticator.shared.style.subheadlineColor, for: .normal)
167167

168168
// These constraints work around some issues with multiline buttons and
169169
// vertical layout. Without them the button's height may not account

0 commit comments

Comments
 (0)