Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions TJLayoutHelperDemo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@
<userDefinedRuntimeAttribute type="number" keyPath="XrSpace">
<real key="value" value="200"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="number" keyPath="X_XsSpace">
<real key="value" value="200"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</constraint>
</constraints>
Expand Down
10 changes: 1 addition & 9 deletions TJLayoutHelperDemo/TJLayoutHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ import UIKit
}
}
}

@IBInspectable var XSpace: CGFloat = 0.0 {
didSet {
if UIDevice.current.screenType == .iPhoneX_Xs {
self.adjustSpaceForConstraint()
}
}
}

@IBInspectable var XsMaxSpace: CGFloat = 0.0 {
didSet {
Expand Down Expand Up @@ -107,7 +99,7 @@ import UIKit
case .iPhones_5_5s_5c_SE:
self.addConstant(addition: inch4Space)
case .iPhoneX_Xs:
self.addConstant(addition: XSpace)
self.addConstant(addition: X_XsSpace)
case .iPhoneXr:
self.addConstant(addition: XrSpace)
case .iPhoneXsMax:
Expand Down
2 changes: 1 addition & 1 deletion TJLayoutHelperDemo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ViewController: UIViewController {
break
}
consBlueViewTop.inch5_5Space = 20
consBlueViewTop.XSpace = 30
consBlueViewTop.X_XsSpace = 30
}

override func viewDidLoad() {
Expand Down