Skip to content

Commit ac3ae8c

Browse files
committed
Merge branch 'release/1.0.0'
2 parents bc193c7 + 8c21bec commit ac3ae8c

File tree

74 files changed

+1629
-315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1629
-315
lines changed

.codecov.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
coverage:
22
status:
33
patch: off
4+
comment:
5+
layout: "diff, files"
46
ignore:
57
- "Carthage/**/*"
68
- "Example*/**/*"
7-
- "*Tests/**/*"
9+
- "Tests/**/*"
810
- "Pods/**/*"

.jazzy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ github_url: https://github.com/bcylin/QuickTableViewController
55
github_file_prefix: https://github.com/bcylin/QuickTableViewController/blob/develop
66
xcodebuild_arguments: [-project, QuickTableViewController.xcodeproj, -scheme, QuickTableViewController-iOS]
77
module: QuickTableViewController
8-
module_version: 0.9.1
8+
module_version: 1.0.0
99
output: docs/output
1010
theme: fullwidth
1111
skip_undocumented: true

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ install:
1616
before_script:
1717
- if [ -n "$DANGER_GITHUB_API_TOKEN" ]; then bundle exec danger; fi
1818
script:
19-
- bundle exec rake "ci:build[QuickTableViewController-iOS, 3.0]"
20-
- bundle exec rake "ci:test[QuickTableViewController-iOS]"
19+
- set -o pipefail
20+
- xcodebuild clean build -workspace QuickTableViewController.xcworkspace -scheme QuickTableViewController-iOS -sdk iphonesimulator SWIFT_VERSION=3.0 | bundle exec xcpretty -c
21+
- bundle exec rake "test:ios[QuickTableViewController-iOS]"
22+
- bundle exec rake "test:tvos[QuickTableViewController-tvOS]"
2123
- bash <(curl -s https://codecov.io/bash) -cF ios -J "QuickTableViewController"
22-
- bundle exec rake "ci:test[Example-iOS]"
24+
- bundle exec rake "test:ios[Example-iOS]"
25+
- bundle exec rake "build:tvos[Example-tvOS]"
2326
- make -B carthage
2427
- make -B docs
2528
after_success:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## v1.0.0
4+
5+
#### Enhancements
6+
7+
* Support tvOS
8+
39
## v0.9.1
410

511
#### Fixes

Example-iOS/AppDelegate.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// AppDelegate.swift
3-
// Example
3+
// Example-iOS
44
//
55
// Created by Ben on 01/09/2015.
66
// Copyright (c) 2015 bcylin.
@@ -33,8 +33,10 @@ internal final class AppDelegate: UIResponder, UIApplicationDelegate {
3333

3434
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {
3535

36-
// See AppearanceViewController for the setups.
37-
UILabel.appearance(whenContainedInInstancesOf: [UITableViewCell.self]).textColor = .blue
36+
if #available(iOS 9.0, *) {
37+
// See AppearanceViewController for the setups.
38+
UILabel.appearance(whenContainedInInstancesOf: [UITableViewCell.self]).textColor = .blue
39+
}
3840

3941
window = UIWindow(frame: UIScreen.main.bounds)
4042
window?.backgroundColor = UIColor.white

Example-iOS/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>0.9.1</string>
20+
<string>1.0.0</string>
2121
<key>CFBundleVersion</key>
2222
<string>101</string>
2323
<key>LSRequiresIPhoneOS</key>

Example-iOS/ViewControllers/AppearanceViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// AppearanceViewController.swift
3-
// Example
3+
// Example-iOS
44
//
55
// Created by Ben on 30/01/2018.
66
// Copyright © 2018 bcylin.

Example-iOS/ViewControllers/CustomizationViewController.swift

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// CustomizationViewController.swift
3-
// Example
3+
// Example-iOS
44
//
55
// Created by Ben on 30/01/2018.
66
// Copyright © 2018 bcylin.
@@ -26,7 +26,6 @@
2626

2727
import UIKit
2828
import QuickTableViewController
29-
import Weakify
3029

3130
private final class CustomCell: UITableViewCell {}
3231
private final class CustomSwitchCell: SwitchCell {}
@@ -60,26 +59,26 @@ internal final class CustomizationViewController: QuickTableViewController {
6059
title: "SwitchRow\n<CustomSwitchCell>",
6160
switchValue: true,
6261
customization: set(label: "0-0"),
63-
action: weakify(self, type(of: self).log)
62+
action: showLog()
6463
),
6564
CustomSwitchRow<SwitchCell>(
6665
title: "CustomSwitchRow\n<SwitchCell>",
6766
switchValue: false,
6867
customization: set(label: "0-1"),
69-
action: weakify(self, type(of: self).log)
68+
action: showLog()
7069
)
7170
]),
7271

7372
Section(title: "Tap Action", rows: [
7473
TapActionRow<CustomTapActionCell>(
7574
title: "TapActionRow\n<CustomTapActionCell>",
7675
customization: set(label: "1-0"),
77-
action: weakify(self, type(of: self).log)
76+
action: showLog()
7877
),
7978
CustomTapActionRow<TapActionCell>(
8079
title: "CustomTapActionRow\n<TapActionCell>",
8180
customization: set(label: "1-1"),
82-
action: weakify(self, type(of: self).log)
81+
action: showLog()
8382
)
8483
]),
8584

@@ -88,24 +87,25 @@ internal final class CustomizationViewController: QuickTableViewController {
8887
title: "NavigationRow",
8988
subtitle: .none,
9089
customization: set(label: "2-0"),
91-
action: weakify(self, type(of: self).log)),
90+
action: showLog()
91+
),
9292
NavigationRow<CustomCell>(
9393
title: "NavigationRow<CustomCell>",
9494
subtitle: .belowTitle(".subtitle"),
9595
customization: set(label: "2-1"),
96-
action: weakify(self, type(of: self).log)
96+
action: showLog()
9797
),
9898
CustomNavigationRow(
9999
title: "CustomNavigationRow",
100100
subtitle: .rightAligned(".value1"),
101101
customization: set(label: "2-2"),
102-
action: weakify(self, type(of: self).log)
102+
action: showLog()
103103
),
104104
CustomNavigationRow<CustomCell>(
105105
title: "CustomNavigationRow<CustomCell>",
106106
subtitle: .leftAligned(".value2"),
107107
customization: set(label: "2-3"),
108-
action: weakify(self, type(of: self).log)
108+
action: showLog()
109109
)
110110
]),
111111

@@ -114,19 +114,19 @@ internal final class CustomizationViewController: QuickTableViewController {
114114
title: "OptionRow",
115115
isSelected: false,
116116
customization: set(label: "3-0"),
117-
action: weakify(self, type(of: self).log)
117+
action: showLog()
118118
),
119119
CustomOptionRow(
120120
title: "CustomOptionRow",
121121
isSelected: false,
122122
customization: set(label: "3-1"),
123-
action: weakify(self, type(of: self).log)
123+
action: showLog()
124124
),
125125
CustomOptionRow<CustomOptionCell>(
126126
title: "CustomOptionRow<CustomOptionCell>",
127127
isSelected: false,
128128
customization: set(label: "3-2"),
129-
action: weakify(self, type(of: self).log)
129+
action: showLog()
130130
)
131131
]),
132132

@@ -155,16 +155,19 @@ internal final class CustomizationViewController: QuickTableViewController {
155155
}
156156
}
157157

158-
private func log(_ sender: Row) {
159-
if let option = sender as? OptionRowCompatible, !option.isSelected {
160-
return
161-
}
162-
163-
let text = (sender as! RowStyle).cellReuseIdentifier
164-
debugging.rows = [NavigationRow(title: text, subtitle: .none)]
165-
print(text)
166-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [weak self] in
167-
self?.tableView.reloadData()
158+
private func showLog() -> (Row) -> Void {
159+
return { [weak self] in
160+
if let option = $0 as? OptionRowCompatible, !option.isSelected {
161+
return
162+
}
163+
let identifier = ($0 as! RowStyle).cellReuseIdentifier
164+
self?.debugging.rows = [
165+
NavigationRow(title: identifier, subtitle: .none, customization: self?.set(label: "debug"))
166+
]
167+
print(identifier)
168+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [weak self] in
169+
self?.tableView.reloadData()
170+
}
168171
}
169172
}
170173

0 commit comments

Comments
 (0)