Skip to content

Commit 6f42279

Browse files
authored
Merge pull request #16 from layoutBox/update_graphs
Update graphs
2 parents fc5adc7 + aa375ab commit 6f42279

13 files changed

+85
-7
lines changed

Podfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ inhibit_all_warnings!
1010

1111
target 'LayoutFrameworkBenchmark' do
1212
pod 'FlexLayout'
13-
pod 'LayoutKit'
14-
pod 'PinLayout'
15-
pod 'Reveal-SDK'
13+
pod 'LayoutKit'
1614
pod 'NotAutoLayout'
1715
pod 'NKFrameLayoutKit'
16+
pod 'PinLayout'
17+
18+
pod 'Reveal-SDK'
1819
end

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ SPEC CHECKSUMS:
3131
PinLayout: 21ce87a865407a7a3c8a38a326611c476095fedf
3232
Reveal-SDK: ed36bdbb3cbf90b94ae5da0dbcb3c7ae6738c51f
3333

34-
PODFILE CHECKSUM: 2cdc011667a7f9e27a997f01bc1401d8830f418d
34+
PODFILE CHECKSUM: 7f58ddd1b9687b031aeb33d986faeaf19ed0e225
3535

3636
COCOAPODS: 1.5.3

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@ The **X axis** in following charts indicates the **number of cells** contained f
116116
<a href="docs_markdown/benchmark_iphonex.png"><img src="docs_markdown/benchmark_iphonex.png"/></a>
117117
<br>
118118

119-
<a href="docs_markdown/benchmark_iphone8.png"><img src="docs_markdown/benchmark_iphone8.png"/></a>
120-
<br>
121-
122119
<a href="docs_markdown/benchmark_iphone7.png"><img src="docs_markdown/benchmark_iphone7.png"/></a>
123120
<br>
124121

Tests/CellLayoutSpec.swift

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Copyright (c) 2017 Luc Dion
2+
// Permission is hereby granted, free of charge, to any person obtaining a copy
3+
// of this software and associated documentation files (the "Software"), to deal
4+
// in the Software without restriction, including without limitation the rights
5+
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
// copies of the Software, and to permit persons to whom the Software is
7+
// furnished to do so, subject to the following conditions:
8+
//
9+
// The above copyright notice and this permission notice shall be included in
10+
// all copies or substantial portions of the Software.
11+
//
12+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
// THE SOFTWARE.
19+
20+
import Quick
21+
import Nimble
22+
@testable import LayoutFrameworkBenchmark
23+
24+
class CellLayoutSpec: QuickSpec {
25+
override func spec() {
26+
var viewController: UIViewController!
27+
let data = FeedItemData.generate(count: 1)[0]
28+
29+
beforeSuite {
30+
}
31+
32+
beforeEach {
33+
viewController = UIViewController()
34+
viewController.view = UIView()
35+
}
36+
37+
describe("layout all cells with a width of 600 pixels") {
38+
it("test LayoutKit") {
39+
let feedItemView = FeedItemLayoutKitView(frame: .zero)
40+
feedItemView.setData(data)
41+
feedItemView.layoutIfNeeded()
42+
43+
let size = feedItemView.sizeThatFits(CGSize(width: 600, height: CGFloat.greatestFiniteMagnitude))
44+
feedItemView.frame = CGRect(origin: .zero, size: size)
45+
46+
expect(feedItemView.frame).to(equal(CGRect(x: 0.0, y: 0.0, width: 600, height: 600.0)))
47+
}
48+
49+
it("test PinLayout") {
50+
let feedItemView = FeedItemPinLayoutView(frame: .zero)
51+
let size = feedItemView.sizeThatFits(CGSize(width: 600, height: CGFloat.greatestFiniteMagnitude))
52+
53+
feedItemView.frame = CGRect(origin: .zero, size: size)
54+
expect(feedItemView.frame).to(equal(CGRect(x: 0.0, y: 0.0, width: 600, height: 600.0)))
55+
}
56+
}
57+
}
58+
}

Tests/Info.plist

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>1</string>
21+
</dict>
22+
</plist>
298 Bytes
Loading
345 Bytes
Loading

docs_markdown/benchmark_iphone5s.png

-26.3 KB
Loading

docs_markdown/benchmark_iphone6.png

-20.8 KB
Loading

docs_markdown/benchmark_iphone6s.png

-20.7 KB
Loading

0 commit comments

Comments
 (0)