Skip to content

Commit b866a61

Browse files
committed
Updated SPDiffable dependence version.
1 parent 28f328a commit b866a61

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

Example App/NativeUIKit.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
/* End PBXCopyFilesBuildPhase section */
7070

7171
/* Begin PBXFileReference section */
72+
F41E02AA276C836700C7BD05 /* NativeUIKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = NativeUIKit; path = ..; sourceTree = "<group>"; };
7273
F4C33DD926C92DF8001A28B1 /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
73-
F4C33DF026C92E1B001A28B1 /* NativeUIKit */ = {isa = PBXFileReference; lastKnownFileType = folder; name = NativeUIKit; path = ..; sourceTree = "<group>"; };
7474
F4C33DF126C92E52001A28B1 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7575
F4C33DF326C92E52001A28B1 /* RootController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RootController.swift; sourceTree = "<group>"; };
7676
F4C33DF526C92E52001A28B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -123,7 +123,7 @@
123123
F4C33DD026C92DF8001A28B1 = {
124124
isa = PBXGroup;
125125
children = (
126-
F4C33DF026C92E1B001A28B1 /* NativeUIKit */,
126+
F41E02AA276C836700C7BD05 /* NativeUIKit */,
127127
F4C33DDB26C92DF8001A28B1 /* iOS Example */,
128128
F4C33E0B26C9315F001A28B1 /* tvOS Example */,
129129
F4C33E3126C932C8001A28B1 /* watchOS Example */,

Example App/NativeUIKit.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.8'
4+
s.version = '1.1.9'
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 }

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let package = Package(
1515
dependencies: [
1616
.package(name: "SparrowKit", url: "https://github.com/ivanvorobei/SparrowKit", .upToNextMajor(from: "3.3.6")),
1717
.package(name: "SPPerspective", url: "https://github.com/ivanvorobei/SPPerspective", .upToNextMajor(from: "1.4.0")),
18-
.package(name: "SPDiffable", url: "https://github.com/ivanvorobei/SPDiffable", .upToNextMajor(from: "1.6.0"))
18+
.package(name: "SPDiffable", url: "https://github.com/ivanvorobei/SPDiffable", .upToNextMajor(from: "2.0.0"))
1919
],
2020
targets: [
2121
.target(

Sources/NativeUIKit/Controllers/Complex/Profile/NativeProfileHeaderView.swift

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ open class NativeProfileHeaderView: SPView {
5050
$0.textAlignment = .center
5151
$0.adjustsFontSizeToFitWidth = true
5252
$0.minimumScaleFactor = 0.5
53-
$0.text = .space
53+
$0.text = nil
5454
}
5555

5656
// Add tap to clipboard
@@ -66,6 +66,8 @@ open class NativeProfileHeaderView: SPView {
6666

6767
private var extendView = SPView()
6868

69+
var nameTextObserer: NSKeyValueObservation?
70+
6971
// MARK: - Init
7072

7173
open override func commonInit() {
@@ -79,6 +81,15 @@ open class NativeProfileHeaderView: SPView {
7981
bottom: NativeLayout.Spaces.default_half,
8082
right: NativeLayout.Spaces.default_double
8183
)
84+
85+
self.nameLabel.isHidden = !(self.nameLabel == self.usingNameLabel)
86+
self.namePlaceholderLabel.isHidden = !(self.namePlaceholderLabel == self.usingNameLabel)
87+
88+
nameTextObserer = nameLabel.observe(\.text) { [weak self] _, _ in
89+
guard let self = self else { return }
90+
self.nameLabel.isHidden = !(self.nameLabel == self.usingNameLabel)
91+
self.namePlaceholderLabel.isHidden = !(self.namePlaceholderLabel == self.usingNameLabel)
92+
}
8293
}
8394

8495
// MARK: - Ovveride
@@ -115,9 +126,6 @@ open class NativeProfileHeaderView: SPView {
115126
namePlaceholderLabel.setXCenter()
116127
namePlaceholderLabel.frame.origin.y = nameLabel.frame.origin.y
117128

118-
nameLabel.isHidden = !(nameLabel == usingNameLabel)
119-
namePlaceholderLabel.isHidden = !(namePlaceholderLabel == usingNameLabel)
120-
121129
emailButton.sizeToFit()
122130
emailButton.setXCenter()
123131
emailButton.frame.origin.y = usingNameLabel.frame.maxY

0 commit comments

Comments
 (0)