Skip to content

Commit 85848d3

Browse files
committed
Fixed colors and naming for NativePlaceholderView.
1 parent 95862a7 commit 85848d3

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

NativeUIKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22

33
s.name = 'NativeUIKit'
4-
s.version = '1.1.2'
4+
s.version = '1.1.4'
55
s.summary = 'Mimicrated views and controls to native Apple appearance.'
66
s.homepage = 'https://github.com/ivanvorobei/NativeUIKit'
77
s.source = { :git => 'https://github.com/ivanvorobei/NativeUIKit.git', :tag => s.version }

Sources/NativeUIKit/Views/NativePlaceholderView.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,22 @@
2323
import UIKit
2424
import 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

Comments
 (0)