@@ -22,17 +22,17 @@ extension UIButton {
2222
2323 let normalBackgroundImage = UIImage . renderBackgroundImage ( fill: . primaryButtonBackground,
2424 border: . primaryButtonBorder)
25- . applyTintColorToiOS13 ( . primaryButtonBackground)
25+ . withTintColor ( . primaryButtonBackground)
2626 setBackgroundImage ( normalBackgroundImage, for: . normal)
2727
2828 let highlightedBackgroundImage = UIImage . renderBackgroundImage ( fill: . primaryButtonDownBackground,
2929 border: . primaryButtonDownBorder)
30- . applyTintColorToiOS13 ( . primaryButtonDownBackground)
30+ . withTintColor ( . primaryButtonDownBackground)
3131 setBackgroundImage ( highlightedBackgroundImage, for: . highlighted)
3232
3333 let disabledBackgroundImage = UIImage . renderBackgroundImage ( fill: . buttonDisabledBackground,
3434 border: . buttonDisabledBorder)
35- . applyTintColorToiOS13 ( . buttonDisabledBorder) // Use border as tint color since the background is clear
35+ . withTintColor ( . buttonDisabledBorder) // Use border as tint color since the background is clear
3636 setBackgroundImage ( disabledBackgroundImage, for: . disabled)
3737 }
3838
@@ -54,17 +54,17 @@ extension UIButton {
5454
5555 let normalBackgroundImage = UIImage . renderBackgroundImage ( fill: . secondaryButtonBackground,
5656 border: . secondaryButtonBorder)
57- . applyTintColorToiOS13 ( . secondaryButtonBackground)
57+ . withTintColor ( . secondaryButtonBackground)
5858 setBackgroundImage ( normalBackgroundImage, for: . normal)
5959
6060 let highlightedBackgroundImage = UIImage . renderBackgroundImage ( fill: . secondaryButtonDownBackground,
6161 border: . secondaryButtonDownBorder)
62- . applyTintColorToiOS13 ( . secondaryButtonDownBackground)
62+ . withTintColor ( . secondaryButtonDownBackground)
6363 setBackgroundImage ( highlightedBackgroundImage, for: . highlighted)
6464
6565 let disabledBackgroundImage = UIImage . renderBackgroundImage ( fill: . buttonDisabledBackground,
6666 border: . buttonDisabledBorder)
67- . applyTintColorToiOS13 ( . buttonDisabledBackground)
67+ . withTintColor ( . buttonDisabledBackground)
6868 setBackgroundImage ( disabledBackgroundImage, for: . disabled)
6969 }
7070
@@ -110,25 +110,25 @@ extension UIButton {
110110
111111 let normalBackgroundImage = UIImage . renderBackgroundImage ( fill: . tertiarySystemBackground,
112112 border: . secondaryButtonBorder)
113- . applyTintColorToiOS13 ( . tertiarySystemBackground)
113+ . withTintColor ( . tertiarySystemBackground)
114114 setBackgroundImage ( normalBackgroundImage, for: . normal)
115115
116116 let highlightedBackgroundImage = UIImage . renderBackgroundImage ( fill: . secondaryButtonDownBackground,
117117 border: . secondaryButtonDownBorder)
118- . applyTintColorToiOS13 ( . secondaryButtonDownBackground)
118+ . withTintColor ( . secondaryButtonDownBackground)
119119 setBackgroundImage ( highlightedBackgroundImage, for: . highlighted)
120120
121121 let disabledBackgroundImage = UIImage . renderBackgroundImage ( fill: . buttonDisabledBackground,
122122 border: . buttonDisabledBorder)
123- . applyTintColorToiOS13 ( . buttonDisabledBackground)
123+ . withTintColor ( . buttonDisabledBackground)
124124 setBackgroundImage ( disabledBackgroundImage, for: . disabled)
125125 }
126126
127127 /// Applies the Single-Color Icon Button Style: accent/accent dark tint color
128128 ///
129129 func applyIconButtonStyle( icon: UIImage ) {
130- let normalImage = icon. applyTintColor ( . accent)
131- let highlightedImage = icon. applyTintColor ( . accentDark)
130+ let normalImage = icon. withTintColor ( . accent)
131+ let highlightedImage = icon. withTintColor ( . accentDark)
132132 setImage ( normalImage, for: . normal)
133133 setImage ( highlightedImage, for: . highlighted)
134134 tintColor = . accent
0 commit comments