Skip to content

Commit 668e850

Browse files
committed
clean H/VStackLayer WrapperView ContainerView
1 parent fbd0e4d commit 668e850

12 files changed

Lines changed: 2 additions & 486 deletions

Demo/Demo/HVStackDemoViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class HVStackDemoViewController: UIViewController {
9090
}
9191

9292
HStackView(alignment: .top, distribution: .spacing(14), padding: UIEdgeInsets(top: 2, left: 12, bottom: 2, right: 6)) {
93-
VStackView {
93+
VStackView(padding: .init(top: 8, left: 0, bottom: 0, right: 0)) {
9494
UIView().stack.size(6).then {
9595
$0.backgroundColor = .systemBlue
9696
$0.layer.cornerRadius = 3

Demo/Demo/HVStackWrapperViewDemoViewController.swift

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -138,33 +138,6 @@ class HVStackWrapperViewDemoViewController: UIViewController {
138138
super.viewDidLoad()
139139

140140
// Do any additional setup after loading the view.
141-
142-
143-
func makeTextLayer(title: String) -> CATextLayer {
144-
let textLayer = CATextLayer()
145-
textLayer.string = title
146-
textLayer.fontSize = 14
147-
textLayer.foregroundColor = UIColor.black.cgColor
148-
textLayer.contentsScale = UIScreen.main.scale
149-
return textLayer
150-
}
151-
152-
content.addContent {
153-
VStackLayerContainerView(distribution: .fillWidth(spacing: 0), padding: UIEdgeInsets(top: 10, left: 14, bottom: 10, right: 14)) {
154-
Spacer(length: 20)
155-
makeTextLayer(title: "This is CATextLayer in VStackLayerContainerView")
156-
makeTextLayer(title: "1This is CATextLayer in VStackLayerContainerView1")
157-
}
158-
159-
HStackLayerContainerView(padding: UIEdgeInsets(top: 10, left: 14, bottom: 10, right: 14)) {
160-
Spacer(length: 20)
161-
162-
makeTextLayer(title: "Nickname")
163-
Spacer()
164-
makeTextLayer(title: "UserId")
165-
}
166-
}
167-
content.sizeToFit()
168141
self.view.addSubview(content)
169142
}
170143

@@ -173,15 +146,5 @@ class HVStackWrapperViewDemoViewController: UIViewController {
173146

174147
content.pin.top(view.pin.safeArea).horizontally().sizeToFit(.width)
175148
}
176-
177-
/*
178-
// MARK: - Navigation
179-
180-
// In a storyboard-based application, you will often want to do a little preparation before navigation
181-
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
182-
// Get the new view controller using segue.destination.
183-
// Pass the selected object to the new view controller.
184-
}
185-
*/
186-
149+
187150
}

Sources/StackKit/Layer+LayerWraperView/HStackLayerContainerView.swift

Lines changed: 0 additions & 85 deletions
This file was deleted.

Sources/StackKit/Layer+LayerWraperView/HStackLayerWrapperView.swift

Lines changed: 0 additions & 86 deletions
This file was deleted.

Sources/StackKit/Layer+LayerWraperView/VStackLayerContainerView.swift

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)