Skip to content

Commit 877d0e8

Browse files
committed
Merge branch 'feature/minor-changes' into develop
2 parents d8dfc22 + a5bf50b commit 877d0e8

8 files changed

Lines changed: 34 additions & 14 deletions

File tree

.jazzy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ clean: true
22
author: bcylin
33
author_url: https://github.com/bcylin
44
github_url: https://github.com/bcylin/QuickTableViewController
5-
github_file_prefix: https://github.com/bcylin/QuickTableViewController/blob/develop
5+
github_file_prefix: https://github.com/bcylin/QuickTableViewController/blob/v1.1.0
66
xcodebuild_arguments: [-project, QuickTableViewController.xcodeproj, -scheme, QuickTableViewController-iOS]
77
module: QuickTableViewController
88
module_version: 1.1.0

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ cache:
66
before_install:
77
- export LANG=en_US.UTF-8
88
- xcrun instruments -s devices
9-
- open -a /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
109
install:
1110
- bundle install --without development --deployment --jobs=3 --retry=3
11+
- bundle exec rake launch:simulators
1212
- bundle exec pod install
1313
before_script:
1414
- if [ -n "$DANGER_GITHUB_API_TOKEN" ]; then bundle exec danger; fi

CHANGELOG.md

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

3+
## v1.1.1
4+
5+
#### Fixes
6+
7+
* Fix the animated `OptionRow` deselection
8+
* Invoke `accessoryButtonAction` asynchronously to match the behaviour of row `action`
9+
310
## v1.1.0
411

512
#### Enhancements

Example-iOS/ViewControllers/ExampleViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ internal final class ExampleViewController: QuickTableViewController {
122122
private func showDebuggingText(_ text: String) {
123123
print(text)
124124
debugging.rows = [NavigationRow(text: text, detailText: .none)]
125-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { [weak self] in
126-
self?.tableView.reloadData()
125+
if let section = tableContents.index(where: { $0 === debugging }) {
126+
tableView.reloadSections([section], with: .none)
127127
}
128128
}
129129

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ bump:
2020
ifeq (,$(strip $(version)))
2121
# Usage: make bump version=<number>
2222
else
23-
ruby -pi -e "gsub(/\d+\.\d+\.\d+/i, \""$(version)"\")" QuickTableViewController.podspec
24-
ruby -pi -e "gsub(/:\s\d+\.\d+\.\d+/i, \": "$(version)"\")" .jazzy.yml
23+
ruby -pi -e "gsub(%r{\d+\.\d+\.\d+}, %{"$(version)"})" QuickTableViewController.podspec
24+
ruby -pi -e "gsub(%r{\d+\.\d+\.\d+}, %{"$(version)"})" .jazzy.yml
2525
xcrun agvtool new-marketing-version $(version)
2626
endif
2727

QuickTableViewController.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,6 @@
14141414
B5334F271B8CC5BD00C64A6D /* Debug */ = {
14151415
isa = XCBuildConfiguration;
14161416
buildSettings = {
1417-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
14181417
ALWAYS_SEARCH_USER_PATHS = NO;
14191418
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14201419
CLANG_CXX_LIBRARY = "libc++";
@@ -1479,7 +1478,6 @@
14791478
B5334F281B8CC5BD00C64A6D /* Release */ = {
14801479
isa = XCBuildConfiguration;
14811480
buildSettings = {
1482-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
14831481
ALWAYS_SEARCH_USER_PATHS = NO;
14841482
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
14851483
CLANG_CXX_LIBRARY = "libc++";
@@ -1536,7 +1534,6 @@
15361534
B5334F2A1B8CC5BD00C64A6D /* Debug */ = {
15371535
isa = XCBuildConfiguration;
15381536
buildSettings = {
1539-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
15401537
CLANG_ENABLE_MODULES = YES;
15411538
DEFINES_MODULE = YES;
15421539
DEVELOPMENT_TEAM = "";
@@ -1556,7 +1553,6 @@
15561553
B5334F2B1B8CC5BD00C64A6D /* Release */ = {
15571554
isa = XCBuildConfiguration;
15581555
buildSettings = {
1559-
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
15601556
CLANG_ENABLE_MODULES = YES;
15611557
DEFINES_MODULE = YES;
15621558
DEVELOPMENT_TEAM = "";

Rakefile

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
require "fileutils"
22

3+
ios_device = "iPhone X"
4+
ios_version = "12.1"
5+
tvos_device = "Apple TV"
6+
tvos_version = "12.1"
7+
8+
39
def xcodebuild(params)
410
return ":" unless params[:scheme]
511
[
@@ -14,6 +20,15 @@ def xcodebuild(params)
1420
end
1521

1622

23+
namespace :launch do
24+
desc "Launch iOS and tvOS simulators"
25+
task :simulators do
26+
sh %(xcrun instruments -w "#{ios_device} (#{ios_version}) [" || true)
27+
sh %(xcrun instruments -w "#{tvos_device} (#{tvos_version}) [" || true)
28+
end
29+
end
30+
31+
1732
namespace :build do
1833
desc "Build an iOS target with the specified scheme"
1934
task :ios, [:scheme] do |t, args|
@@ -46,7 +61,7 @@ namespace :test do
4661

4762
sh xcodebuild(args.to_hash.merge({
4863
action: "-enableCodeCoverage YES clean test",
49-
destination: %(-destination "name=iPhone 8,OS=latest"),
64+
destination: %(-destination "name=#{ios_device},OS=#{ios_version}"),
5065
simulator: "iphonesimulator"
5166
}))
5267
exit $?.exitstatus if not $?.success?
@@ -58,7 +73,7 @@ namespace :test do
5873

5974
sh xcodebuild(args.to_hash.merge({
6075
action: "-enableCodeCoverage YES clean test",
61-
destination: %(-destination "name=Apple TV,OS=latest"),
76+
destination: %(-destination "name=#{tvos_device},OS=#{tvos_version}"),
6277
simulator: "appletvsimulator"
6378
}))
6479
exit $?.exitstatus if not $?.success?

Source/QuickTableViewController.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ open class QuickTableViewController: UIViewController, UITableViewDataSource, UI
133133
if changes.isEmpty {
134134
tableView.deselectRow(at: indexPath, animated: false)
135135
} else {
136-
tableView.reloadData()
136+
tableView.reloadRows(at: changes, with: .automatic)
137137
}
138138

139139
case let (_, option as OptionRowCompatible):
@@ -169,7 +169,9 @@ open class QuickTableViewController: UIViewController, UITableViewDataSource, UI
169169
public func tableView(_ tableView: UITableView, accessoryButtonTappedForRowWith indexPath: IndexPath) {
170170
switch tableContents[indexPath.section].rows[indexPath.row] {
171171
case let row as NavigationRowCompatible:
172-
row.accessoryButtonAction?(row)
172+
DispatchQueue.main.async {
173+
row.accessoryButtonAction?(row)
174+
}
173175
default:
174176
break
175177
}

0 commit comments

Comments
 (0)