Skip to content

Commit 33a1f3e

Browse files
author
Luc Dion
committed
Update documentation charts
1 parent 14dca95 commit 33a1f3e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

docs/Benchmark.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@
1515
##### LayoutKit Benchmark
1616
PinLayout and [FlexLayout](https://github.com/layoutBox/FlexLayout) performance has been benchmarked using [Layout Framework Benchmark](https://github.com/layoutBox/LayoutFrameworkBenchmark).
1717

18-
The benchmark includes the following layout frameworks:
18+
The benchmark includes also many other layout frameworks, including:
1919

2020
* Auto layout
2121
* [FlexLayout](https://github.com/layoutBox/FlexLayout)
2222
* [LayoutKit](https://github.com/linkedin/LayoutKit)
2323
* Manual layout (i.e. set UIView's frame directly)
2424
* [PinLayout](https://github.com/layoutBox/PinLayout)
2525
* UIStackViews
26+
* ...
2627

2728

2829
### Benchmark
@@ -32,7 +33,7 @@ As you can see in the following chart, PinLayout are faster or equal to manual l
3233
The benchmark layout UICollectionView and UITableView cells in multiple pass, each pass contains more cells than the previous one.
3334

3435
<p align="center">
35-
<a href=""><img src="Benchmark/benchmark_comparison_all.png" alt="PinLayout Performance"/></a>
36+
<a href=""><img src="Benchmark/benchmark_comparison_all_small.png" alt="PinLayout Performance"/></a>
3637

3738
See [Layout Framework Benchmark](https://github.com/layoutBox/LayoutFrameworkBenchmark) for complete details and benchmarks charts for iPhone X/8/7/6S/...
3839

@@ -55,30 +56,29 @@ override func layoutSubviews() {
5556
super.layoutSubviews()
5657

5758
let hMargin: CGFloat = 8
58-
let vMargin: CGFloat = 2
59+
let vMargin: CGFloat = 4
5960

6061
optionsLabel.pin.topRight().margin(hMargin)
6162
actionLabel.pin.topLeft().margin(hMargin)
6263

6364
posterImageView.pin.below(of: actionLabel, aligned: .left).marginTop(10)
64-
posterNameLabel.pin.right(of: posterImageView, aligned: .top).margin(-6, 6).right(hMargin).sizeToFit()
65-
posterHeadlineLabel.pin.below(of: posterNameLabel, aligned: .left).right(hMargin).marginTop(1).sizeToFit()
66-
posterTimeLabel.pin.below(of: posterHeadlineLabel, aligned: .left).right(hMargin).marginTop(1).sizeToFit()
6765

68-
posterCommentLabel.pin.below(of: posterTimeLabel).left(hMargin).right().right(hMargin)
69-
.marginTop(vMargin).sizeToFit()
66+
posterHeadlineLabel.pin.after(of: posterImageView, aligned: .center).marginLeft(4)
67+
posterNameLabel.pin.above(of: posterHeadlineLabel, aligned: .left).marginBottom(vMargin)
68+
posterTimeLabel.pin.below(of: posterHeadlineLabel, aligned: .left).marginTop(vMargin)
7069

71-
contentImageView.pin.below(of: posterCommentLabel).hCenter().width(100%).sizeToFit()
72-
contentTitleLabel.pin.below(of: contentImageView).left().right().marginHorizontal(hMargin).sizeToFit()
73-
contentDomainLabel.pin.below(of: contentTitleLabel, aligned: .left).right().marginRight(hMargin)
74-
.sizeToFit()
70+
posterCommentLabel.pin.below(of: posterTimeLabel).left(hMargin).marginTop(vMargin)
71+
72+
contentImageView.pin.below(of: posterCommentLabel, aligned: .left).right().marginTop(vMargin).marginRight(hMargin)
73+
contentTitleLabel.pin.below(of: contentImageView).left().marginHorizontal(hMargin)
74+
contentDomainLabel.pin.below(of: contentTitleLabel, aligned: .left)
7575

7676
likeLabel.pin.below(of: contentDomainLabel, aligned: .left).marginTop(vMargin)
77-
commentLabel.pin.top(to: likeLabel.edge.top).hCenter(50%)
77+
commentLabel.pin.top(to: likeLabel.edge.top).hCenter()
7878
shareLabel.pin.top(to: likeLabel.edge.top).right().marginRight(hMargin)
7979

8080
actorImageView.pin.below(of: likeLabel, aligned: .left).marginTop(vMargin)
81-
actorCommentLabel.pin.right(of: actorImageView, aligned: .center).marginLeft(4)
81+
actorCommentLabel.pin.after(of: actorImageView, aligned: .center).marginLeft(4)
8282
}
8383
```
8484

-48.8 KB
Binary file not shown.
-21.1 KB
Loading

0 commit comments

Comments
 (0)