Skip to content

Commit 8bf233f

Browse files
author
Luc Dion
committed
Initial commit
1 parent fc5adc7 commit 8bf233f

File tree

10 files changed

+127
-7
lines changed

10 files changed

+127
-7
lines changed

LayoutFrameworkBenchmark.xcodeproj/xcshareddata/xcschemes/LayoutFrameworkBenchmark.xcscheme

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
2929
shouldUseLaunchSchemeArgsEnv = "YES">
3030
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "DF337CCC20D1831D0035DECF"
36+
BuildableName = "LayoutFrameworkBenchmarkTests-iOS.xctest"
37+
BlueprintName = "LayoutFrameworkBenchmarkTests-iOS"
38+
ReferencedContainer = "container:LayoutFrameworkBenchmark.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
3141
</Testables>
3242
<MacroExpansion>
3343
<BuildableReference

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: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,50 @@
11
PODS:
2+
<<<<<<< HEAD
23
- FlexLayout (1.3.9)
34
- LayoutKit (8.0.1)
45
- NKFrameLayoutKit (2.1)
56
- NotAutoLayout (3.1.1)
67
- PinLayout (1.7.9)
78
- Reveal-SDK (16)
9+
=======
10+
- FlexLayout (1.3.6)
11+
- LayoutKit (7.0.2)
12+
- Nimble (7.1.2)
13+
- NotAutoLayout (3.1.1)
14+
- PinLayout (1.7.8)
15+
- Quick (1.3.0)
16+
- Reveal-SDK (10)
17+
>>>>>>> Initial commit
818

919
DEPENDENCIES:
1020
- FlexLayout
1121
- LayoutKit
22+
<<<<<<< HEAD
1223
- NKFrameLayoutKit
24+
=======
25+
- Nimble
26+
>>>>>>> Initial commit
1327
- NotAutoLayout
1428
- PinLayout
15-
- Reveal-SDK
29+
- Quick
30+
- Reveal-SDK (~> 10)
1631

1732
SPEC REPOS:
1833
https://github.com/cocoapods/specs.git:
1934
- FlexLayout
2035
- LayoutKit
36+
<<<<<<< HEAD
2137
- NKFrameLayoutKit
38+
=======
39+
- Nimble
40+
>>>>>>> Initial commit
2241
- NotAutoLayout
2342
- PinLayout
43+
- Quick
2444
- Reveal-SDK
2545

2646
SPEC CHECKSUMS:
47+
<<<<<<< HEAD
2748
FlexLayout: dbe4b2da72ee63d7145cf32bb5bfba375aeeb9e6
2849
LayoutKit: dab1c2eea7a0bf9d8d755a8a793f87a929768455
2950
NKFrameLayoutKit: 6a2f6ac34f85d495e683ea0f7f1605903a4d3e00
@@ -32,5 +53,16 @@ SPEC CHECKSUMS:
3253
Reveal-SDK: ed36bdbb3cbf90b94ae5da0dbcb3c7ae6738c51f
3354

3455
PODFILE CHECKSUM: 2cdc011667a7f9e27a997f01bc1401d8830f418d
56+
=======
57+
FlexLayout: bcdde388eaf826cfb6f801c8a507e2dca70412fa
58+
LayoutKit: 183c513f8322f4e22321499e54163864bcdf7d97
59+
Nimble: 3835ba9f459daa6b347f8a8e110aaae8ca1920a8
60+
NotAutoLayout: 2e6e82146dcb556cb61fcfd638b202639c167e84
61+
PinLayout: 2baeb56058fcbc600e4a39146868d78f998b0e1f
62+
Quick: 03278013f71aa05fe9ecabc94fbcc6835f1ee76f
63+
Reveal-SDK: 7869ddf1f902cabbb07a1f0dd06bd25861a126f7
64+
65+
PODFILE CHECKSUM: 8dfce0b8ca416f33319615ec6b0853028e3d147a
66+
>>>>>>> Initial commit
3567

3668
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>
14.6 KB
Loading
14 KB
Loading
-60.2 KB
Binary file not shown.
19.5 KB
Loading

0 commit comments

Comments
 (0)