2323import UIKit
2424import SparrowKit
2525
26- open class PlaceholderView : SPButton {
26+ open class NativePlaceholderView : SPButton {
2727
2828 // MARK: - Views
2929
3030 public let iconImageView = SPImageView ( ) . do {
3131 $0. contentMode = . scaleAspectFit
32- $0. tintColor = . tint
3332 }
3433
3534 public let headerLabel = SPLabel ( ) . do {
3635 $0. numberOfLines = . zero
37- $0. textColor = . tint
3836 $0. textAlignment = . center
3937 $0. font = UIFont . preferredFont ( forTextStyle: . title1, weight: . bold)
4038 }
4139
4240 public let descriptionLabel = SPLabel ( ) . do {
4341 $0. numberOfLines = . zero
44- $0. textColor = . tint
4542 $0. textAlignment = . center
4643 $0. font = UIFont . preferredFont ( forTextStyle: . body, weight: . regular)
4744 }
@@ -72,8 +69,11 @@ open class PlaceholderView: SPButton {
7269 tintColor = UIColor . black. alpha ( 0.3 )
7370 }
7471 backgroundColor = . clear
72+ iconImageView. tintColor = tintColor
7573 addSubview ( iconImageView)
74+ headerLabel. textColor = tintColor
7675 addSubview ( headerLabel)
76+ descriptionLabel. textColor = tintColor
7777 addSubview ( descriptionLabel)
7878 }
7979
@@ -113,7 +113,7 @@ open class PlaceholderView: SPButton {
113113 sizeToFit ( )
114114 let width = min ( superview. readableWidth, NativeLayout . Sizes. actionable_area_maximum_width)
115115 frame. setWidth ( width)
116- superview . setXCenter ( )
116+ setXCenter ( )
117117 frame. origin. y = y
118118 }
119119
@@ -124,7 +124,7 @@ open class PlaceholderView: SPButton {
124124 guard let superview = self . superview else { return }
125125 let width = min ( superview. readableWidth, NativeLayout . Sizes. actionable_area_maximum_width)
126126 setWidthAndFit ( width: width)
127- superview . setXCenter ( )
127+ setXCenter ( )
128128 center. y = ( superview. frame. height / 2 ) * 0.94
129129 }
130130
0 commit comments