Skip to content

Commit d15f0f2

Browse files
committed
Replace tab indent with spaces
1 parent f3389b0 commit d15f0f2

File tree

3 files changed

+169
-169
lines changed

3 files changed

+169
-169
lines changed

LayoutFrameworkBenchmark.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@
290290
"${BUILT_PRODUCTS_DIR}/NKFrameLayoutKit/NKFrameLayoutKit.framework",
291291
"${BUILT_PRODUCTS_DIR}/NotAutoLayout/NotAutoLayout.framework",
292292
"${BUILT_PRODUCTS_DIR}/PinLayout/PinLayout.framework",
293-
"${PODS_ROOT}/Reveal-SDK/RevealServer-14/iOS/RevealServer.framework",
293+
"${PODS_ROOT}/Reveal-SDK/RevealServer-16/iOS/RevealServer.framework",
294294
);
295295
name = "[CP] Embed Pods Frameworks";
296296
outputPaths = (

LayoutFrameworkBenchmark/Benchmarks/NKFrameLayoutKit/NKFrameLayoutKitView.swift

Lines changed: 158 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -10,162 +10,162 @@ import NKFrameLayoutKit
1010

1111
/// A LinkedIn feed item that is implemented with NKFrameLayoutKit code.
1212
class NKFrameLayoutKitView: UIView, DataBinder {
13-
14-
var mainFrameLayout: NKGridFrameLayout!
15-
16-
let actionLabel: UILabel = {
17-
let l = UILabel()
18-
l.backgroundColor = UIColor.blue
19-
return l
20-
}()
21-
22-
let optionsLabel: UILabel = {
23-
let l = UILabel()
24-
l.text = "..."
25-
return l
26-
}()
27-
28-
let posterImageView: UIImageView = {
29-
let i = UIImageView()
30-
i.image = UIImage(named: "50x50.png")
31-
i.backgroundColor = UIColor.orange
32-
i.contentMode = .scaleToFill
33-
return i
34-
}()
35-
36-
let posterNameLabel: UILabel = UILabel()
37-
38-
let posterHeadlineLabel: UILabel = {
39-
let l = UILabel()
40-
l.numberOfLines = 3
41-
return l
42-
}()
43-
44-
let posterTimeLabel: UILabel = UILabel()
45-
let posterCommentLabel: UILabel = UILabel()
46-
47-
let contentImageView: UIImageView = {
48-
let i = UIImageView()
49-
i.image = UIImage(named: "350x200.png")
50-
i.contentMode = .scaleToFill
51-
return i
52-
}()
53-
54-
let contentTitleLabel: UILabel = UILabel()
55-
let contentDomainLabel: UILabel = UILabel()
56-
57-
let likeLabel: UILabel = {
58-
let l = UILabel()
59-
l.backgroundColor = UIColor(red: 0, green: 0.9, blue: 0, alpha: 1)
60-
l.text = "Like"
61-
return l
62-
}()
63-
64-
let commentLabel: UILabel = {
65-
let l = UILabel()
66-
l.text = "Comment"
67-
l.backgroundColor = UIColor(red: 0, green: 1.0, blue: 0, alpha: 1)
68-
l.textAlignment = .center
69-
return l
70-
}()
71-
72-
let shareLabel: UILabel = {
73-
let l = UILabel()
74-
l.text = "Share"
75-
l.backgroundColor = UIColor(red: 0, green: 0.8, blue: 0, alpha: 1)
76-
l.textAlignment = .right
77-
return l
78-
}()
79-
80-
let actorImageView: UIImageView = {
81-
let i = UIImageView()
82-
i.image = UIImage(named: "50x50.png")
83-
return i
84-
}()
85-
86-
let actorCommentLabel: UILabel = UILabel()
87-
88-
lazy var topBar: NKDoubleFrameLayout = {
89-
let v = NKDoubleFrameLayout(direction: .horizontal, andViews: [self.actionLabel, self.optionsLabel])!
90-
v.rightFrameLayout.contentHorizontalAlignment = .right
91-
return v
92-
}()
93-
94-
lazy var posters: NKDoubleFrameLayout = {
95-
let labels = NKGridFrameLayout(direction: .vertical, andViews: [self.posterNameLabel, self.posterHeadlineLabel, self.posterTimeLabel])!
96-
labels.edgeInsets = UIEdgeInsets(top: 1, left: 2, bottom: 3, right: 4)
97-
98-
let v = NKDoubleFrameLayout(direction: .horizontal, andViews: [self.posterImageView, labels])!
99-
v.leftFrameLayout.contentVerticalAlignment = .center
100-
v.spacing = 1
101-
return v
102-
}()
103-
104-
lazy var actions: NKGridFrameLayout = {
105-
let v = NKGridFrameLayout(direction: .horizontal)! // andViews: [self.likeLabel, self.commentLabel, self.shareLabel]
106-
v.add(withTargetView: self.likeLabel).contentHorizontalAlignment = .left
107-
v.add(withTargetView: self.commentLabel).contentHorizontalAlignment = .center
108-
v.add(withTargetView: self.shareLabel).contentHorizontalAlignment = .right
109-
v.layoutAlignment = .split
110-
return v
111-
}()
112-
113-
lazy var comment: NKDoubleFrameLayout = {
114-
let v = NKDoubleFrameLayout(direction: .horizontal, andViews: [self.actorImageView, self.actorCommentLabel])!
115-
return v
116-
}()
117-
118-
override init(frame: CGRect) {
119-
super.init(frame: frame)
120-
addSubview(actionLabel)
121-
addSubview(optionsLabel)
122-
addSubview(posterImageView)
123-
addSubview(posterNameLabel)
124-
addSubview(posterHeadlineLabel)
125-
addSubview(posterTimeLabel)
126-
addSubview(posterCommentLabel)
127-
addSubview(contentImageView)
128-
addSubview(contentTitleLabel)
129-
addSubview(contentDomainLabel)
130-
addSubview(likeLabel)
131-
addSubview(commentLabel)
132-
addSubview(shareLabel)
133-
addSubview(actorImageView)
134-
addSubview(actorCommentLabel)
135-
backgroundColor = UIColor.white
136-
137-
mainFrameLayout = NKGridFrameLayout(direction: .vertical, andViews: [topBar, posters, posterCommentLabel, contentImageView, contentTitleLabel, contentDomainLabel, actions, comment])
138-
mainFrameLayout.edgeInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5)
139-
addSubview(mainFrameLayout)
140-
}
141-
142-
required init?(coder aDecoder: NSCoder) {
143-
fatalError("init(coder:) has not been implemented")
144-
}
145-
146-
func setData(_ data: FeedItemData) {
147-
actionLabel.text = data.actionText
148-
posterNameLabel.text = data.posterName
149-
posterHeadlineLabel.text = data.posterHeadline
150-
posterTimeLabel.text = data.posterTimestamp
151-
posterCommentLabel.text = data.posterComment
152-
contentTitleLabel.text = data.contentTitle
153-
contentDomainLabel.text = data.contentDomain
154-
actorCommentLabel.text = data.actorComment
155-
setNeedsLayout()
156-
}
157-
158-
override func layoutSubviews() {
159-
super.layoutSubviews()
160-
mainFrameLayout.frame = self.bounds
161-
}
162-
163-
override func sizeThatFits(_ size: CGSize) -> CGSize {
164-
return mainFrameLayout.sizeThatFits(size)
165-
}
166-
167-
override var intrinsicContentSize: CGSize {
168-
return mainFrameLayout.sizeThatFits(CGSize(width: frame.width, height: CGFloat.greatestFiniteMagnitude))
169-
}
13+
14+
var mainFrameLayout: NKGridFrameLayout!
15+
16+
let actionLabel: UILabel = {
17+
let l = UILabel()
18+
l.backgroundColor = UIColor.blue
19+
return l
20+
}()
21+
22+
let optionsLabel: UILabel = {
23+
let l = UILabel()
24+
l.text = "..."
25+
return l
26+
}()
27+
28+
let posterImageView: UIImageView = {
29+
let i = UIImageView()
30+
i.image = UIImage(named: "50x50.png")
31+
i.backgroundColor = UIColor.orange
32+
i.contentMode = .scaleToFill
33+
return i
34+
}()
35+
36+
let posterNameLabel: UILabel = UILabel()
37+
38+
let posterHeadlineLabel: UILabel = {
39+
let l = UILabel()
40+
l.numberOfLines = 3
41+
return l
42+
}()
43+
44+
let posterTimeLabel: UILabel = UILabel()
45+
let posterCommentLabel: UILabel = UILabel()
46+
47+
let contentImageView: UIImageView = {
48+
let i = UIImageView()
49+
i.image = UIImage(named: "350x200.png")
50+
i.contentMode = .scaleToFill
51+
return i
52+
}()
53+
54+
let contentTitleLabel: UILabel = UILabel()
55+
let contentDomainLabel: UILabel = UILabel()
56+
57+
let likeLabel: UILabel = {
58+
let l = UILabel()
59+
l.backgroundColor = UIColor(red: 0, green: 0.9, blue: 0, alpha: 1)
60+
l.text = "Like"
61+
return l
62+
}()
63+
64+
let commentLabel: UILabel = {
65+
let l = UILabel()
66+
l.text = "Comment"
67+
l.backgroundColor = UIColor(red: 0, green: 1.0, blue: 0, alpha: 1)
68+
l.textAlignment = .center
69+
return l
70+
}()
71+
72+
let shareLabel: UILabel = {
73+
let l = UILabel()
74+
l.text = "Share"
75+
l.backgroundColor = UIColor(red: 0, green: 0.8, blue: 0, alpha: 1)
76+
l.textAlignment = .right
77+
return l
78+
}()
79+
80+
let actorImageView: UIImageView = {
81+
let i = UIImageView()
82+
i.image = UIImage(named: "50x50.png")
83+
return i
84+
}()
85+
86+
let actorCommentLabel: UILabel = UILabel()
87+
88+
lazy var topBar: NKDoubleFrameLayout = {
89+
let v = NKDoubleFrameLayout(direction: .horizontal, andViews: [self.actionLabel, self.optionsLabel])!
90+
v.rightFrameLayout.contentHorizontalAlignment = .right
91+
return v
92+
}()
93+
94+
lazy var posters: NKDoubleFrameLayout = {
95+
let labels = NKGridFrameLayout(direction: .vertical, andViews: [self.posterNameLabel, self.posterHeadlineLabel, self.posterTimeLabel])!
96+
let v = NKDoubleFrameLayout(direction: .horizontal, andViews: [self.posterImageView, labels])!
97+
v.leftFrameLayout.contentVerticalAlignment = .center
98+
v.spacing = 5
99+
v.edgeInsets = UIEdgeInsets(top: 5, left: 0, bottom: 0, right: 0)
100+
return v
101+
}()
102+
103+
lazy var actions: NKGridFrameLayout = {
104+
let v = NKGridFrameLayout(direction: .horizontal)! // andViews: [self.likeLabel, self.commentLabel, self.shareLabel]
105+
v.add(withTargetView: self.likeLabel).contentHorizontalAlignment = .left
106+
v.add(withTargetView: self.commentLabel).contentHorizontalAlignment = .center
107+
v.add(withTargetView: self.shareLabel).contentHorizontalAlignment = .right
108+
v.layoutAlignment = .split
109+
return v
110+
}()
111+
112+
lazy var comment: NKDoubleFrameLayout = {
113+
let v = NKDoubleFrameLayout(direction: .horizontal, andViews: [self.actorImageView, self.actorCommentLabel])!
114+
v.edgeInsets = UIEdgeInsets(top: 5, left: 0, bottom: 0, right: 0)
115+
v.spacing = 5
116+
return v
117+
}()
118+
119+
override init(frame: CGRect) {
120+
super.init(frame: frame)
121+
addSubview(actionLabel)
122+
addSubview(optionsLabel)
123+
addSubview(posterImageView)
124+
addSubview(posterNameLabel)
125+
addSubview(posterHeadlineLabel)
126+
addSubview(posterTimeLabel)
127+
addSubview(posterCommentLabel)
128+
addSubview(contentImageView)
129+
addSubview(contentTitleLabel)
130+
addSubview(contentDomainLabel)
131+
addSubview(likeLabel)
132+
addSubview(commentLabel)
133+
addSubview(shareLabel)
134+
addSubview(actorImageView)
135+
addSubview(actorCommentLabel)
136+
backgroundColor = UIColor.white
137+
138+
mainFrameLayout = NKGridFrameLayout(direction: .vertical, andViews: [topBar, posters, posterCommentLabel, contentImageView, contentTitleLabel, contentDomainLabel, actions, comment])
139+
mainFrameLayout.edgeInsets = UIEdgeInsets(top: 5, left: 5, bottom: 5, right: 5)
140+
addSubview(mainFrameLayout)
141+
}
142+
143+
required init?(coder aDecoder: NSCoder) {
144+
fatalError("init(coder:) has not been implemented")
145+
}
146+
147+
func setData(_ data: FeedItemData) {
148+
actionLabel.text = data.actionText
149+
posterNameLabel.text = data.posterName
150+
posterHeadlineLabel.text = data.posterHeadline
151+
posterTimeLabel.text = data.posterTimestamp
152+
posterCommentLabel.text = data.posterComment
153+
contentTitleLabel.text = data.contentTitle
154+
contentDomainLabel.text = data.contentDomain
155+
actorCommentLabel.text = data.actorComment
156+
setNeedsLayout()
157+
}
158+
159+
override func layoutSubviews() {
160+
super.layoutSubviews()
161+
mainFrameLayout.frame = self.bounds
162+
}
163+
164+
override func sizeThatFits(_ size: CGSize) -> CGSize {
165+
return mainFrameLayout.sizeThatFits(size)
166+
}
167+
168+
override var intrinsicContentSize: CGSize {
169+
return mainFrameLayout.sizeThatFits(CGSize(width: frame.width, height: CGFloat.greatestFiniteMagnitude))
170+
}
170171
}
171-

Podfile.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PODS:
2-
- FlexLayout (1.3.6)
3-
- LayoutKit (7.0.2)
4-
- NKFrameLayoutKit (2.0)
2+
- FlexLayout (1.3.9)
3+
- LayoutKit (8.0.1)
4+
- NKFrameLayoutKit (2.1)
55
- NotAutoLayout (3.1.1)
6-
- PinLayout (1.7.5)
7-
- Reveal-SDK (14)
6+
- PinLayout (1.7.8)
7+
- Reveal-SDK (16)
88

99
DEPENDENCIES:
1010
- FlexLayout
@@ -24,12 +24,12 @@ SPEC REPOS:
2424
- Reveal-SDK
2525

2626
SPEC CHECKSUMS:
27-
FlexLayout: bcdde388eaf826cfb6f801c8a507e2dca70412fa
28-
LayoutKit: 183c513f8322f4e22321499e54163864bcdf7d97
29-
NKFrameLayoutKit: e06c8baa8d7a7a107d7201a2f17183f99318d879
27+
FlexLayout: dbe4b2da72ee63d7145cf32bb5bfba375aeeb9e6
28+
LayoutKit: dab1c2eea7a0bf9d8d755a8a793f87a929768455
29+
NKFrameLayoutKit: 6a2f6ac34f85d495e683ea0f7f1605903a4d3e00
3030
NotAutoLayout: 2e6e82146dcb556cb61fcfd638b202639c167e84
31-
PinLayout: d89b8e7107f872c039f15132094bc417aa83271d
32-
Reveal-SDK: 55b5c5545233b680c2f8da734f202acc15d422b7
31+
PinLayout: 2baeb56058fcbc600e4a39146868d78f998b0e1f
32+
Reveal-SDK: ed36bdbb3cbf90b94ae5da0dbcb3c7ae6738c51f
3333

3434
PODFILE CHECKSUM: 9565083f4813952a5a640666616b259832defa8b
3535

0 commit comments

Comments
 (0)