From c5cd9e72df0c6e9b12d33177ac0c3bfe4fa4f5f1 Mon Sep 17 00:00:00 2001 From: Ben Date: Sun, 23 Oct 2016 22:40:12 +0800 Subject: [PATCH 01/14] Upgrade to CocoaPods (1.1.1) --- .swift-version | 1 + Gemfile | 2 +- Gemfile.lock | 58 ++++++++++++++++++++++++++------------------------ Podfile.lock | 2 +- 4 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 .swift-version diff --git a/.swift-version b/.swift-version new file mode 100644 index 00000000..9f55b2cc --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +3.0 diff --git a/Gemfile b/Gemfile index bbe1125e..d9e51355 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source "http://rubygems.org" ruby "2.3.1" gem "bundler" -gem "cocoapods", "~> 1.1.0.rc.2" +gem "cocoapods", "~> 1.1.0" gem "danger", "~> 0.10.0" gem "jazzy", "~> 0.7.0" gem "rake" diff --git a/Gemfile.lock b/Gemfile.lock index d5d9fe4e..5d57d96b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,41 +9,41 @@ GEM tzinfo (~> 1.1) addressable (2.4.0) babosa (1.0.2) - claide (1.0.0) + claide (1.0.1) claide-plugins (0.9.1) cork nap open4 (~> 1.3) clamp (0.6.5) - cocoapods (1.1.0.rc.2) + cocoapods (1.1.1) activesupport (>= 4.0.2, < 5) - claide (>= 1.0.0, < 2.0) - cocoapods-core (= 1.1.0.rc.2) + claide (>= 1.0.1, < 2.0) + cocoapods-core (= 1.1.1) cocoapods-deintegrate (>= 1.0.1, < 2.0) - cocoapods-downloader (>= 1.1.1, < 2.0) + cocoapods-downloader (>= 1.1.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.1.1, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) colored (~> 1.2) escape (~> 0.0.4) - fourflusher (~> 1.0.1) + fourflusher (~> 2.0.1) gh_inspector (~> 1.0) molinillo (~> 0.5.1) nap (~> 1.0) - xcodeproj (>= 1.3.1, < 2.0) - cocoapods-core (1.1.0.rc.2) + xcodeproj (>= 1.3.3, < 2.0) + cocoapods-core (1.1.1) activesupport (>= 4.0.2, < 5) fuzzy_match (~> 2.0.4) nap (~> 1.0) cocoapods-deintegrate (1.0.1) - cocoapods-downloader (1.1.1) + cocoapods-downloader (1.1.2) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.0) cocoapods-stats (1.0.0) - cocoapods-trunk (1.0.0) + cocoapods-trunk (1.1.1) nap (>= 0.8, < 2.0) netrc (= 0.7.8) cocoapods-try (1.1.0) @@ -52,7 +52,7 @@ GEM highline (~> 1.7.2) cork (0.2.0) colored (~> 1.2) - credentials_manager (0.16.1) + credentials_manager (0.16.2) colored commander (>= 4.3.5) highline (>= 1.7.1) @@ -69,25 +69,25 @@ GEM redcarpet (~> 3.3) terminal-table (~> 1) escape (0.0.4) - excon (0.45.4) + excon (0.54.0) faraday (0.9.2) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) - fastlane_core (0.52.0) + fastlane_core (0.53.0) babosa colored commander (>= 4.4.0, <= 5.0.0) - credentials_manager (>= 0.16.0, < 1.0.0) - excon (~> 0.45.0) + credentials_manager (>= 0.16.2, < 1.0.0) + excon (>= 0.45.0, < 1.0) gh_inspector (>= 1.0.1, < 2.0.0) highline (>= 1.7.2) json multi_json - plist (~> 3.1) + plist (>= 3.1.0, < 4.0.0) rubyzip (~> 1.1.6) - terminal-table (~> 1.4.5) - fourflusher (1.0.1) + terminal-table (>= 1.4.5, < 2.0.0) + fourflusher (2.0.1) fuzzy_match (2.0.4) gh_inspector (1.0.2) git (1.3.0) @@ -106,7 +106,7 @@ GEM liferaft (0.0.4) mini_portile2 (2.1.0) minitest (5.9.1) - molinillo (0.5.1) + molinillo (0.5.2) multi_json (1.12.1) multipart-post (2.0.0) mustache (0.99.8) @@ -128,11 +128,11 @@ GEM sawyer (0.7.0) addressable (>= 2.3.5, < 2.5) faraday (~> 0.8, < 0.10) - scan (0.13.0) - fastlane_core (>= 0.52.0, < 1.0.0) + scan (0.13.1) + fastlane_core (>= 0.52.1, < 1.0.0) slack-notifier (~> 1.3) terminal-table - xcpretty (>= 0.2.1) + xcpretty (>= 0.2.2) xcpretty-travis-formatter (>= 0.0.3) security (0.1.3) slack-notifier (1.5.1) @@ -142,17 +142,19 @@ GEM nokogiri (~> 1.6.3) xcodeproj (>= 0.20, < 2.0.0) sqlite3 (1.3.11) - terminal-table (1.4.5) + terminal-table (1.7.3) + unicode-display_width (~> 1.1.1) thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) + unicode-display_width (1.1.1) xcinvoke (0.2.1) liferaft (~> 0.0.4) - xcodeproj (1.3.1) + xcodeproj (1.3.3) activesupport (>= 3) - claide (>= 1.0.0, < 2.0) + claide (>= 1.0.1, < 2.0) colored (~> 1.2) - xcpretty (0.2.3) + xcpretty (0.2.4) rouge (~> 1.8) xcpretty-travis-formatter (0.0.4) xcpretty (~> 0.2, >= 0.0.7) @@ -162,7 +164,7 @@ PLATFORMS DEPENDENCIES bundler - cocoapods (~> 1.1.0.rc.2) + cocoapods (~> 1.1.0) danger (~> 0.10.0) jazzy (~> 0.7.0) rake diff --git a/Podfile.lock b/Podfile.lock index ed72abba..3ae3b4f5 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -33,4 +33,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 700bf6791293c4cd4f5b58d4e2d1c0a00575e529 -COCOAPODS: 1.1.0.rc.2 +COCOAPODS: 1.1.1 From ad787ffbc7952ecd9ee4b9f8b616249d70acde2d Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 25 Oct 2016 00:17:03 +0800 Subject: [PATCH 02/14] Set per project indentation width --- Example.xcodeproj/project.pbxproj | 4 ++++ QuickTableViewController.xcodeproj/project.pbxproj | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj index 581054f4..5858f336 100644 --- a/Example.xcodeproj/project.pbxproj +++ b/Example.xcodeproj/project.pbxproj @@ -63,7 +63,11 @@ A08429DFE9677455AFFC14F2 /* Pods */, B5133F2D1D9D550D004DE48D /* Products */, ); + indentWidth = 2; sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + wrapsLines = 0; }; B5133F2D1D9D550D004DE48D /* Products */ = { isa = PBXGroup; diff --git a/QuickTableViewController.xcodeproj/project.pbxproj b/QuickTableViewController.xcodeproj/project.pbxproj index 0f97c3d7..a9f7f309 100644 --- a/QuickTableViewController.xcodeproj/project.pbxproj +++ b/QuickTableViewController.xcodeproj/project.pbxproj @@ -93,7 +93,11 @@ B5334F151B8CC5BD00C64A6D /* QuickTableViewController */, B5334F221B8CC5BD00C64A6D /* QuickTableViewControllerTests */, ); + indentWidth = 2; sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + wrapsLines = 0; }; B5334F141B8CC5BD00C64A6D /* Products */ = { isa = PBXGroup; From 15687dae2e4481fe135cd8315815e0d45f8d597e Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 2 Nov 2016 22:18:28 +0800 Subject: [PATCH 03/14] Update README.md [ci skip] --- README.md | 53 +++++++++++++++++++++-------------------------------- 1 file changed, 21 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 8297f993..95ccd46f 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,11 @@ class ViewController: QuickTableViewController { // MARK: - Actions - private func showAlert(sender: Row) { + private func showAlert(_ sender: Row) { // ... } - private func showDetail(sender: Row) { + private func showDetail(_ sender: Row) { // ... } @@ -146,45 +146,34 @@ QuickTableViewController | iOS | Xcode | Swift ## Installation -### Install via [Carthage](https://github.com/Carthage/Carthage) +### Use [CocoaPods](http://guides.cocoapods.org/) -* Create a `Cartfile` with the following specification and run `carthage bootstrap`. +Create a `Podfile` with the following specification and run `pod install`. - ``` - github "bcylin/QuickTableViewController" - ``` +```rb +platform :ios, '8.0' +use_frameworks! -* On your application targets' **General** settings tab, in the **Linked Frameworks and Libraries** section, drag and drop `QuickTableViewController.framework` from the Carthage/Build folder. - -* On your application targets’ **Build Phases** settings tab, click the **+** icon and choose **New Run Script Phase**. Create a Run Script with the following contents: - - ``` - /usr/local/bin/carthage copy-frameworks - ``` - - and add the following path to **Input Files**: - - ``` - $(SRCROOT)/Carthage/Build/iOS/QuickTableViewController.framework - ``` - -* For more information, please check out the [Carthage Documentation](https://github.com/Carthage/Carthage#if-youre-building-for-ios). - -### Install via [CocoaPods](http://guides.cocoapods.org/) +pod 'QuickTableViewController', '~> 0.5.0' +``` -* Create a `Podfile` with the following specification and run `pod install`. +### Use [Carthage](https://github.com/Carthage/Carthage) - ```rb - platform :ios, '8.0' - use_frameworks! +Create a `Cartfile` with the following specification and run `carthage update QuickTableViewController`. +Follow the [instructions](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) to add the framework to your project. - pod 'QuickTableViewController', '~> 0.5.0' - ``` +``` +github "bcylin/QuickTableViewController" ~> 0.5.0 +``` -### Install Manually +### Use Git Submodule -* Copy `*.swift` files in the `Source` directory to an iOS project. +``` +git submodule add -b master git@github.com:bcylin/QuickTableViewController.git Dependencies/QuickTableViewController +``` +* Drag **QuickTableViewController.xcodeproj** to your app project as a subproject. +* On your application target's **Build Phases** settings tab, add **QuickTableViewController-iOS** to **Target Dependencies**. ## Contact From cd9f138a5b6db66cfe3727aad483b7fd5afa7a52 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 2 Nov 2016 22:21:58 +0800 Subject: [PATCH 04/14] Update Danger (4.0.0) --- Dangerfile | 11 +++++------ Gemfile | 2 +- Gemfile.lock | 17 +++++++++-------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Dangerfile b/Dangerfile index 4a39006e..9f24bb4e 100644 --- a/Dangerfile +++ b/Dangerfile @@ -2,7 +2,7 @@ # Sometimes it's a README fix, or something like that - which isn't relevant for # including in a project's CHANGELOG for example -declared_trivial = pr_title.include? "#trivial" +declared_trivial = (github.pr_title + github.pr_body).include?("#trivial") # Make it more obvious that a PR is a work in progress and shouldn't be merged yet warn("PR is classed as Work in Progress") if pr_title.include? "[WIP]" @@ -10,16 +10,15 @@ warn("PR is classed as Work in Progress") if pr_title.include? "[WIP]" # Warn when there is a big PR warn("Big PR") if lines_of_code > 500 -# Don't let testing shortcuts get into master by accident -fail("fdescribe left in tests") if `grep -r fdescribe specs/`.length > 1 -fail("fit left in tests") if `grep -r "fit specs/ `.length > 1 +# Ensure there is a summary for a PR +fail "Please provide a summary in the Pull Request description" if github.pr_body.length < 1 # Add a CHANGELOG entry for app changes -if git.lines_of_code > 50 && !github.modified_files.include?("CHANGELOG.md") && !declared_trivial +if git.lines_of_code > 50 && !git.modified_files.include?("CHANGELOG.md") && !declared_trivial fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/bcylin/QuickTableViewController/blob/develop/CHANGELOG.md).") end # Ensure a clean commits history -if git.commits.any? { |c| c.message =~ /^Merge branch '#{github.branch_for_base}'/ } +if git.commits.any? { |c| c.message =~ /^Merge branch/ } fail('Please rebase to get rid of the merge commits in this PR') end diff --git a/Gemfile b/Gemfile index d9e51355..8b5cee1a 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ ruby "2.3.1" gem "bundler" gem "cocoapods", "~> 1.1.0" -gem "danger", "~> 0.10.0" +gem "danger", "~> 4.0.0" gem "jazzy", "~> 0.7.0" gem "rake" gem "scan" diff --git a/Gemfile.lock b/Gemfile.lock index 5d57d96b..c6139efd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -10,7 +10,7 @@ GEM addressable (2.4.0) babosa (1.0.2) claide (1.0.1) - claide-plugins (0.9.1) + claide-plugins (0.9.2) cork nap open4 (~> 1.3) @@ -57,16 +57,16 @@ GEM commander (>= 4.3.5) highline (>= 1.7.1) security - danger (0.10.1) + danger (4.0.0) claide (~> 1.0) - claide-plugins (~> 0.9) + claide-plugins (>= 0.9.2) colored (~> 1.2) cork (~> 0.1) - faraday (~> 0) + faraday (~> 0.9) faraday-http-cache (~> 1.0) git (~> 1) + kramdown (~> 1.5) octokit (~> 4.2) - redcarpet (~> 3.3) terminal-table (~> 1) escape (0.0.4) excon (0.54.0) @@ -103,6 +103,7 @@ GEM sqlite3 (~> 1.3) xcinvoke (~> 0.2.1) json (1.8.3) + kramdown (1.12.0) liferaft (0.0.4) mini_portile2 (2.1.0) minitest (5.9.1) @@ -115,7 +116,7 @@ GEM nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) - octokit (4.3.0) + octokit (4.4.1) sawyer (~> 0.7.0, >= 0.5.3) open4 (1.3.4) pkg-config (1.1.7) @@ -165,7 +166,7 @@ PLATFORMS DEPENDENCIES bundler cocoapods (~> 1.1.0) - danger (~> 0.10.0) + danger (~> 4.0.0) jazzy (~> 0.7.0) rake scan @@ -176,4 +177,4 @@ RUBY VERSION ruby 2.3.1p112 BUNDLED WITH - 1.12.5 + 1.13.6 From 227c05813b2b74fa0fd7bce37dc645f3e58e80dd Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 2 Nov 2016 22:26:30 +0800 Subject: [PATCH 05/14] Update to Xcode 8.1 recommended settings --- Example.xcodeproj/project.pbxproj | 8 +++++++- Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme | 2 +- QuickTableViewController.xcodeproj/project.pbxproj | 2 +- .../xcschemes/QuickTableViewController-iOS.xcscheme | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj index 5858f336..363c02e1 100644 --- a/Example.xcodeproj/project.pbxproj +++ b/Example.xcodeproj/project.pbxproj @@ -119,7 +119,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0800; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = bcylin; TargetAttributes = { B5133F2B1D9D550D004DE48D = { @@ -234,6 +234,7 @@ B5133F471D9D550D004DE48D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -249,6 +250,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -284,6 +286,7 @@ B5133F481D9D550D004DE48D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -299,6 +302,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -328,6 +332,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = B210B15629AAA59EA1559FDA /* Pods-Example.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; @@ -342,6 +347,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 3AC7D4E6AB04C46BA1E83D5D /* Pods-Example.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Example/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; diff --git a/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme index b36d77c2..19f51e97 100644 --- a/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +++ b/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -1,6 +1,6 @@ Date: Mon, 31 Oct 2016 23:46:25 +0800 Subject: [PATCH 06/14] Separate table view models into different files --- .swiftlint.yml | 1 + .../project.pbxproj | 44 ++- Source/Icon.swift | 87 +++++ Source/NavigationRow.swift | 66 ++++ Source/QuickTableModel.swift | 316 ------------------ Source/Row.swift | 49 +++ Source/Section.swift | 48 +++ Source/Subtitle.swift | 79 +++++ Source/SwitchCell.swift | 62 ++++ Source/SwitchRow.swift | 71 ++++ ...ableViewCell.swift => TapActionCell.swift} | 41 +-- Source/TapActionRow.swift | 52 +++ 12 files changed, 552 insertions(+), 364 deletions(-) create mode 100644 Source/Icon.swift create mode 100644 Source/NavigationRow.swift delete mode 100644 Source/QuickTableModel.swift create mode 100644 Source/Row.swift create mode 100644 Source/Section.swift create mode 100644 Source/Subtitle.swift create mode 100644 Source/SwitchCell.swift create mode 100644 Source/SwitchRow.swift rename Source/{QuickTableViewCell.swift => TapActionCell.swift} (68%) create mode 100644 Source/TapActionRow.swift diff --git a/.swiftlint.yml b/.swiftlint.yml index 2aa729b1..6bd5ab57 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -3,6 +3,7 @@ disabled_rules: - force_cast - function_body_length - valid_docs + - vertical_whitespace included: - Example - QuickTableViewControllerTests diff --git a/QuickTableViewController.xcodeproj/project.pbxproj b/QuickTableViewController.xcodeproj/project.pbxproj index 099c14ac..87aec68e 100644 --- a/QuickTableViewController.xcodeproj/project.pbxproj +++ b/QuickTableViewController.xcodeproj/project.pbxproj @@ -13,14 +13,21 @@ B578B5091C5673240021F7C3 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = B578B5071C5673240021F7C3 /* icon.png */; }; B578B50A1C5673240021F7C3 /* icon-highlighted.png in Resources */ = {isa = PBXBuildFile; fileRef = B578B5081C5673240021F7C3 /* icon-highlighted.png */; }; B57FAA6E1C513454008FF7C7 /* QuickTableViewControllerSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B57FAA6C1C512D5B008FF7C7 /* QuickTableViewControllerSpec.swift */; }; - B595627B1B9758BC00D6DAB1 /* QuickTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B595627A1B9758BC00D6DAB1 /* QuickTableViewCell.swift */; }; + B595627B1B9758BC00D6DAB1 /* TapActionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B595627A1B9758BC00D6DAB1 /* TapActionCell.swift */; }; B5DB7D271C4B7F74007B84D2 /* IconSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB7D251C4B7F0E007B84D2 /* IconSpec.swift */; }; B5DB7D2D1C4B8294007B84D2 /* NavigationRowSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB7D2C1C4B8294007B84D2 /* NavigationRowSpec.swift */; }; B5DB7D2F1C4B95D3007B84D2 /* SwitchRowSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB7D2E1C4B95D3007B84D2 /* SwitchRowSpec.swift */; }; B5DB7D311C4B9ACB007B84D2 /* TapActionRowSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB7D301C4B9ACB007B84D2 /* TapActionRowSpec.swift */; }; B5DB7D351C4CBB74007B84D2 /* SectionSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB7D341C4CBB74007B84D2 /* SectionSpec.swift */; }; B5DB94351BE117EE00E2CEDE /* SubtitleSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5DB94341BE117EE00E2CEDE /* SubtitleSpec.swift */; }; - B5EC18231B95FD7F0015C665 /* QuickTableModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5EC18221B95FD7F0015C665 /* QuickTableModel.swift */; }; + B5E029211DC7A39200B5C90E /* Section.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E029201DC7A39200B5C90E /* Section.swift */; }; + B5E029231DC8B3EC00B5C90E /* Icon.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E029221DC8B3EC00B5C90E /* Icon.swift */; }; + B5EC18231B95FD7F0015C665 /* Row.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5EC18221B95FD7F0015C665 /* Row.swift */; }; + B5F0FFE61E9CC69C007BF1C9 /* SwitchCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F0FFE51E9CC69C007BF1C9 /* SwitchCell.swift */; }; + B5F0FFE81E9CC6E8007BF1C9 /* NavigationRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F0FFE71E9CC6E8007BF1C9 /* NavigationRow.swift */; }; + B5F0FFEA1E9CC6F9007BF1C9 /* SwitchRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F0FFE91E9CC6F9007BF1C9 /* SwitchRow.swift */; }; + B5F0FFEC1E9CC72D007BF1C9 /* TapActionRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F0FFEB1E9CC72D007BF1C9 /* TapActionRow.swift */; }; + B5F0FFEE1E9CC73D007BF1C9 /* Subtitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5F0FFED1E9CC73D007BF1C9 /* Subtitle.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -45,14 +52,21 @@ B578B5071C5673240021F7C3 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; }; B578B5081C5673240021F7C3 /* icon-highlighted.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-highlighted.png"; sourceTree = ""; }; B57FAA6C1C512D5B008FF7C7 /* QuickTableViewControllerSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QuickTableViewControllerSpec.swift; sourceTree = ""; }; - B595627A1B9758BC00D6DAB1 /* QuickTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = QuickTableViewCell.swift; path = Source/QuickTableViewCell.swift; sourceTree = SOURCE_ROOT; }; + B595627A1B9758BC00D6DAB1 /* TapActionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TapActionCell.swift; path = Source/TapActionCell.swift; sourceTree = SOURCE_ROOT; }; B5DB7D251C4B7F0E007B84D2 /* IconSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconSpec.swift; sourceTree = ""; }; B5DB7D2C1C4B8294007B84D2 /* NavigationRowSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NavigationRowSpec.swift; sourceTree = ""; }; B5DB7D2E1C4B95D3007B84D2 /* SwitchRowSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchRowSpec.swift; sourceTree = ""; }; B5DB7D301C4B9ACB007B84D2 /* TapActionRowSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TapActionRowSpec.swift; sourceTree = ""; }; B5DB7D341C4CBB74007B84D2 /* SectionSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SectionSpec.swift; sourceTree = ""; }; B5DB94341BE117EE00E2CEDE /* SubtitleSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SubtitleSpec.swift; sourceTree = ""; }; - B5EC18221B95FD7F0015C665 /* QuickTableModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = QuickTableModel.swift; path = Source/QuickTableModel.swift; sourceTree = SOURCE_ROOT; }; + B5E029201DC7A39200B5C90E /* Section.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Section.swift; path = Source/Section.swift; sourceTree = SOURCE_ROOT; }; + B5E029221DC8B3EC00B5C90E /* Icon.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Icon.swift; path = Source/Icon.swift; sourceTree = SOURCE_ROOT; }; + B5EC18221B95FD7F0015C665 /* Row.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Row.swift; path = Source/Row.swift; sourceTree = SOURCE_ROOT; }; + B5F0FFE51E9CC69C007BF1C9 /* SwitchCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwitchCell.swift; path = Source/SwitchCell.swift; sourceTree = SOURCE_ROOT; }; + B5F0FFE71E9CC6E8007BF1C9 /* NavigationRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = NavigationRow.swift; path = Source/NavigationRow.swift; sourceTree = SOURCE_ROOT; }; + B5F0FFE91E9CC6F9007BF1C9 /* SwitchRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwitchRow.swift; path = Source/SwitchRow.swift; sourceTree = SOURCE_ROOT; }; + B5F0FFEB1E9CC72D007BF1C9 /* TapActionRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TapActionRow.swift; path = Source/TapActionRow.swift; sourceTree = SOURCE_ROOT; }; + B5F0FFED1E9CC73D007BF1C9 /* Subtitle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Subtitle.swift; path = Source/Subtitle.swift; sourceTree = SOURCE_ROOT; }; F45E7695B97DC7347A2C89EF /* Pods-QuickTableViewControllerTests-iOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QuickTableViewControllerTests-iOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-QuickTableViewControllerTests-iOS/Pods-QuickTableViewControllerTests-iOS.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -112,9 +126,16 @@ isa = PBXGroup; children = ( B5334F161B8CC5BD00C64A6D /* Supporting Files */, - B5EC18221B95FD7F0015C665 /* QuickTableModel.swift */, - B595627A1B9758BC00D6DAB1 /* QuickTableViewCell.swift */, + B5E029221DC8B3EC00B5C90E /* Icon.swift */, + B5F0FFE71E9CC6E8007BF1C9 /* NavigationRow.swift */, B5334F2F1B8CC6AA00C64A6D /* QuickTableViewController.swift */, + B5EC18221B95FD7F0015C665 /* Row.swift */, + B5E029201DC7A39200B5C90E /* Section.swift */, + B5F0FFED1E9CC73D007BF1C9 /* Subtitle.swift */, + B5F0FFE51E9CC69C007BF1C9 /* SwitchCell.swift */, + B5F0FFE91E9CC6F9007BF1C9 /* SwitchRow.swift */, + B595627A1B9758BC00D6DAB1 /* TapActionCell.swift */, + B5F0FFEB1E9CC72D007BF1C9 /* TapActionRow.swift */, ); path = QuickTableViewController; sourceTree = ""; @@ -354,9 +375,16 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B5EC18231B95FD7F0015C665 /* QuickTableModel.swift in Sources */, - B595627B1B9758BC00D6DAB1 /* QuickTableViewCell.swift in Sources */, + B5E029231DC8B3EC00B5C90E /* Icon.swift in Sources */, + B5F0FFE81E9CC6E8007BF1C9 /* NavigationRow.swift in Sources */, B5334F301B8CC6AA00C64A6D /* QuickTableViewController.swift in Sources */, + B5EC18231B95FD7F0015C665 /* Row.swift in Sources */, + B5E029211DC7A39200B5C90E /* Section.swift in Sources */, + B5F0FFEE1E9CC73D007BF1C9 /* Subtitle.swift in Sources */, + B5F0FFE61E9CC69C007BF1C9 /* SwitchCell.swift in Sources */, + B5F0FFEA1E9CC6F9007BF1C9 /* SwitchRow.swift in Sources */, + B595627B1B9758BC00D6DAB1 /* TapActionCell.swift in Sources */, + B5F0FFEC1E9CC72D007BF1C9 /* TapActionRow.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/Icon.swift b/Source/Icon.swift new file mode 100644 index 00000000..b989fb3b --- /dev/null +++ b/Source/Icon.swift @@ -0,0 +1,87 @@ +// +// Icon.swift +// QuickTableViewController +// +// Created by Ben on 01/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import Foundation + +/// Any type that conforms to this protocol is able to show an icon image in a table view. +public protocol IconEnabled: Row { + /// The icon of the row. + var icon: Icon? { get } +} + + +/// A struct that represents the image used in a row. +public struct Icon: Equatable { + + /// The image of the normal state. + public var image: UIImage? { + return _image ?? UIImage(named: imageName ?? "") + } + + /// The image of the highlighted state. + public var highlightedImage: UIImage? { + return _highlightedImage ?? UIImage(named: highlightedImageName) + } + + // swiftlint:disable variable_name + fileprivate var _image: UIImage? + fileprivate var _highlightedImage: UIImage? + // swiftlint:eable variable_name + + internal private(set) var imageName: String? + internal var highlightedImageName: String { + if let name = imageName { + return name + "-highlighted" + } else { + return "" + } + } + + /// + public init(imageName: String) { + self.imageName = imageName + } + + /// + public init(image: UIImage, highlightedImage: UIImage? = nil) { + _image = image + _highlightedImage = highlightedImage + } + + private init() {} + + // MARK: Equatable + + /// Returns true iff `lhs` and `rhs` have equal images, highlighted images and image names. + public static func == (lhs: Icon, rhs: Icon) -> Bool { + if let lhsName = lhs.imageName, let rhsName = rhs.imageName { + return lhsName == rhsName + } else { + return lhs._image == rhs._image && lhs._highlightedImage == rhs._highlightedImage + } + } + +} diff --git a/Source/NavigationRow.swift b/Source/NavigationRow.swift new file mode 100644 index 00000000..088cab47 --- /dev/null +++ b/Source/NavigationRow.swift @@ -0,0 +1,66 @@ +// +// NavigationRow.swift +// QuickTableViewController +// +// Created by Ben on 01/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import Foundation + +/// A struct that represents a row that perfoms navigation when seleced. +public struct NavigationRow: Row, Equatable, IconEnabled { + + /// The title text of the row. + public var title: String = "" + + /// The subtitle text of the row. + public var subtitle: Subtitle? + + /// The icon of the row. + public var icon: Icon? + + /// Returns `subtitle.style` as the reuse identifier of the table view cell to display the row. + public var cellReuseIdentifier: String { + return subtitle?.style ?? String(describing: UITableViewCell.self) + } + + /// A closure related to the navigation when the row is selected. + public var action: ((Row) -> Void)? + + /// + public init(title: String, subtitle: Subtitle, icon: Icon? = nil, action: ((Row) -> Void)? = nil) { + self.title = title + self.subtitle = subtitle + self.icon = icon + self.action = action + } + + private init() {} + + // MARK: Equatable + + /// Returns true iff `lhs` and `rhs` have equal titles, subtitles and icons. + public static func == (lhs: NavigationRow, rhs: NavigationRow) -> Bool { + return lhs.title == rhs.title && lhs.subtitle == rhs.subtitle && lhs.icon == rhs.icon + } + +} diff --git a/Source/QuickTableModel.swift b/Source/QuickTableModel.swift deleted file mode 100644 index b7a931bc..00000000 --- a/Source/QuickTableModel.swift +++ /dev/null @@ -1,316 +0,0 @@ -// -// QuickTableModel.swift -// QuickTableViewController -// -// Created by Ben on 01/09/2015. -// Copyright (c) 2015 bcylin. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// - -import Foundation - -/// A struct that represents a section in a table view. -public struct Section { - - /// The text of the section title. - public var title: String? - - /// The array of rows in the section. - public var rows: [Row] - - /// The text of the section footer. - public var footer: String? - - /// - public init(title: String?, rows: [Row], footer: String? = nil) { - self.title = title - self.rows = rows - self.footer = footer - } - -} - - -// MARK: - Row - - -/// Any type that conforms to this protocol is capable of representing a row in a table view. -public protocol Row { - /// The title text of the row. - var title: String { get } - /// The subtitle text of the row. - var subtitle: Subtitle? { get } - /// The reuse identifier of the table view cell to display the row. - var cellReuseIdentifier: String { get } - /// A closure related to the action of the row. - var action: ((Row) -> Void)? { get } -} - - -extension Row { - - /// Returns true iff `lhs` and `rhs` have equal titles and subtitles. - public static func == (lhs: Self, rhs: Self) -> Bool { - return lhs.title == rhs.title && lhs.subtitle == rhs.subtitle - } - -} - - -// MARK: - Icon - - -/// Any type that conforms to this protocol is able to show an icon image in a table view. -public protocol IconEnabled: Row { - /// The icon of the row. - var icon: Icon? { get } -} - -/// A struct that represents the image used in a row. -public struct Icon: Equatable { - - /// The image of the normal state. - public var image: UIImage? { - return _image ?? UIImage(named: imageName ?? "") - } - - /// The image of the highlighted state. - public var highlightedImage: UIImage? { - return _highlightedImage ?? UIImage(named: highlightedImageName) - } - - // swiftlint:disable variable_name - fileprivate var _image: UIImage? - fileprivate var _highlightedImage: UIImage? - // swiftlint:eable variable_name - - internal private(set) var imageName: String? - internal var highlightedImageName: String { - if let name = imageName { - return name + "-highlighted" - } else { - return "" - } - } - - /// - public init(imageName: String) { - self.imageName = imageName - } - - /// - public init(image: UIImage, highlightedImage: UIImage? = nil) { - _image = image - _highlightedImage = highlightedImage - } - - private init() {} - - // MARK: Equatable - - /// Returns true iff `lhs` and `rhs` have equal images, highlighted images and image names. - public static func == (lhs: Icon, rhs: Icon) -> Bool { - if let lhsName = lhs.imageName, let rhsName = rhs.imageName { - return lhsName == rhsName - } else { - return lhs._image == rhs._image && lhs._highlightedImage == rhs._highlightedImage - } - } - -} - -// MARK: - NavigationRow - - -/// A struct that represents a row that perfoms navigation when seleced. -public struct NavigationRow: Row, Equatable, IconEnabled { - - /// The title text of the row. - public var title: String = "" - - /// The subtitle text of the row. - public var subtitle: Subtitle? - - /// The icon of the row. - public var icon: Icon? - - /// Returns `subtitle.style` as the reuse identifier of the table view cell to display the row. - public var cellReuseIdentifier: String { - return subtitle?.style ?? String(describing: UITableViewCell.self) - } - - /// A closure related to the navigation when the row is selected. - public var action: ((Row) -> Void)? - - /// - public init(title: String, subtitle: Subtitle, icon: Icon? = nil, action: ((Row) -> Void)? = nil) { - self.title = title - self.subtitle = subtitle - self.icon = icon - self.action = action - } - - private init() {} - - // MARK: Equatable - - /// Returns true iff `lhs` and `rhs` have equal titles, subtitles and icons. - public static func == (lhs: NavigationRow, rhs: NavigationRow) -> Bool { - return lhs.title == rhs.title && lhs.subtitle == rhs.subtitle && lhs.icon == rhs.icon - } - -} - - -// MARK: - SwitchRow - - -/// A struct that represents a row with a switch. -public struct SwitchRow: Row, Equatable, IconEnabled { - - /// The title text of the row. - public var title: String = "" - - /// Subtitle is disabled in SwitchRow. - public let subtitle: Subtitle? = nil - - /// The icon of the row. - public var icon: Icon? - - /// The state of the switch. - public var switchValue: Bool = false { - didSet { - action?(self) - } - } - - /// The value is **SwitchCell**, as the reuse identifier of the table view cell to display the row. - public let cellReuseIdentifier: String = String(describing: SwitchCell.self) - - /// A closure that will be invoked when the switchValue is changed. - public var action: ((Row) -> Void)? - - /// - public init(title: String, switchValue: Bool, icon: Icon? = nil, action: ((Row) -> Void)?) { - self.title = title - self.switchValue = switchValue - self.icon = icon - self.action = action - } - - private init() {} - - // MARK: Equatable - - /// Returns true iff `lhs` and `rhs` have equal titles, switch values, and icons. - public static func == (lhs: SwitchRow, rhs: SwitchRow) -> Bool { - return lhs.title == rhs.title && lhs.switchValue == rhs.switchValue && lhs.icon == rhs.icon - } - -} - - -// MARK: - TapActionRow - - -/// A struct that represents a row that triggers certain action when seleced. -public struct TapActionRow: Row, Equatable { - - /// The title text of the row. - public var title: String = "" - - /// Subtitle is disabled in TapActionRow. - public let subtitle: Subtitle? = nil - - /// The value is **TapActionCell**, as the reuse identifier of the table view cell to display the row. - public let cellReuseIdentifier: String = String(describing: TapActionCell.self) - - /// A closure as the tap action when the row is selected. - public var action: ((Row) -> Void)? - - /// - public init(title: String, action: ((Row) -> Void)?) { - self.title = title - self.action = action - } - - private init() {} - -} - - -// MARK: - Subtitle - - -/// An enum that represents a subtitle text with `UITableViewCellStyle`. -public enum Subtitle: Equatable { - - /// Does not show a subtitle as `UITableViewCellStyle.default`. - case none - /// Shows the associated text in `UITableViewCellStyle.subtitle`. - case belowTitle(String) - /// Shows the associated text in `UITableViewCellStyle.value1`. - case rightAligned(String) - /// Shows the associated text in `UITableViewCellStyle.value2`. - case leftAligned(String) - - /// Returns the descriptive name of the style. - public var style: String { - get { - switch self { - case .none: return "Subtitle.None" - case .belowTitle(_): return "Subtitle.BelowTitle" - case .rightAligned(_): return "Subtitle.RightAligned" - case .leftAligned(_): return "Subtitle.LeftAligned" - } - } - } - - /// Returns the associated text of the case. - public var text: String? { - get { - switch self { - case let .belowTitle(text): return text - case let .rightAligned(text): return text - case let .leftAligned(text): return text - default: return nil - } - } - } - - // MARK: Equatable - - /// Returns true iff `lhs` and `rhs` have equal texts in the same `Subtitle`. - public static func == (lhs: Subtitle, rhs: Subtitle) -> Bool { - switch (lhs, rhs) { - case (.none, .none): - return true - case let (.belowTitle(a), .belowTitle(b)): - return a == b - case let (.rightAligned(a), .rightAligned(b)): - return a == b - case let (.leftAligned(a), .leftAligned(b)): - return a == b - default: - return false - } - } - -} diff --git a/Source/Row.swift b/Source/Row.swift new file mode 100644 index 00000000..fbad0321 --- /dev/null +++ b/Source/Row.swift @@ -0,0 +1,49 @@ +// +// Row.swift +// QuickTableViewController +// +// Created by Ben on 01/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import Foundation + +/// Any type that conforms to this protocol is capable of representing a row in a table view. +public protocol Row { + /// The title text of the row. + var title: String { get } + /// The subtitle text of the row. + var subtitle: Subtitle? { get } + /// The reuse identifier of the table view cell to display the row. + var cellReuseIdentifier: String { get } + /// A closure related to the action of the row. + var action: ((Row) -> Void)? { get } +} + + +extension Row { + + /// Returns true iff `lhs` and `rhs` have equal titles and subtitles. + public static func == (lhs: Self, rhs: Self) -> Bool { + return lhs.title == rhs.title && lhs.subtitle == rhs.subtitle + } + +} diff --git a/Source/Section.swift b/Source/Section.swift new file mode 100644 index 00000000..d25d60f2 --- /dev/null +++ b/Source/Section.swift @@ -0,0 +1,48 @@ +// +// Section.swift +// QuickTableViewController +// +// Created by Ben on 01/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import Foundation + +/// A struct that represents a section in a table view. +public struct Section { + + /// The text of the section title. + public var title: String? + + /// The array of rows in the section. + public var rows: [Row] + + /// The text of the section footer. + public var footer: String? + + /// + public init(title: String?, rows: [Row], footer: String? = nil) { + self.title = title + self.rows = rows + self.footer = footer + } + +} diff --git a/Source/Subtitle.swift b/Source/Subtitle.swift new file mode 100644 index 00000000..9578b282 --- /dev/null +++ b/Source/Subtitle.swift @@ -0,0 +1,79 @@ +// +// Subtitle.swift +// QuickTableViewController +// +// Created by Ben on 01/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import Foundation + +/// An enum that represents a subtitle text with `UITableViewCellStyle`. +public enum Subtitle: Equatable { + + /// Does not show a subtitle as `UITableViewCellStyle.default`. + case none + /// Shows the associated text in `UITableViewCellStyle.subtitle`. + case belowTitle(String) + /// Shows the associated text in `UITableViewCellStyle.value1`. + case rightAligned(String) + /// Shows the associated text in `UITableViewCellStyle.value2`. + case leftAligned(String) + + /// Returns the descriptive name of the style. + public var style: String { + switch self { + case .none: return "Subtitle.None" + case .belowTitle(_): return "Subtitle.BelowTitle" + case .rightAligned(_): return "Subtitle.RightAligned" + case .leftAligned(_): return "Subtitle.LeftAligned" + } + } + + /// Returns the associated text of the case. + public var text: String? { + switch self { + case let .belowTitle(text): return text + case let .rightAligned(text): return text + case let .leftAligned(text): return text + default: return nil + } + } + + // MARK: Equatable + + /// Returns true iff `lhs` and `rhs` have equal texts in the same `Subtitle`. + public static func == (lhs: Subtitle, rhs: Subtitle) -> Bool { + switch (lhs, rhs) { + case (.none, .none): + return true + case let (.belowTitle(a), .belowTitle(b)): + return a == b + case let (.rightAligned(a), .rightAligned(b)): + return a == b + case let (.leftAligned(a), .leftAligned(b)): + return a == b + default: + return false + } + } + +} diff --git a/Source/SwitchCell.swift b/Source/SwitchCell.swift new file mode 100644 index 00000000..8cd1662d --- /dev/null +++ b/Source/SwitchCell.swift @@ -0,0 +1,62 @@ +// +// SwitchCell.swift +// QuickTableViewController +// +// Created by Ben on 03/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import UIKit + +/// A `UITableViewCell` subclass that shows a `UISwitch` as the `accessoryView`. +open class SwitchCell: UITableViewCell { + + /// A `UISwitch` as the `accessoryView`. + public let switchControl = UISwitch() + + // MARK: Initializer + + /** + Overrides `UITableViewCell`'s designated initializer. + + - parameter style: Unused. It always uses `UITableViewCellStyle.Default`. + - parameter reuseIdentifier: A string used to identify the cell object if it is to be reused for drawing multiple rows of a table view. + + - returns: An initialized `SwitchCell` object. + */ + override public init(style: UITableViewCellStyle, reuseIdentifier: String?) { + super.init(style: .default, reuseIdentifier: reuseIdentifier) + accessoryView = switchControl + } + + /** + Overrides the designated initializer that returns an object initialized from data in a given unarchiver. + + - parameter aDecoder: An unarchiver object. + + - returns: `self`, initialized using the data in decoder. + */ + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + accessoryView = switchControl + } + +} diff --git a/Source/SwitchRow.swift b/Source/SwitchRow.swift new file mode 100644 index 00000000..abaa69db --- /dev/null +++ b/Source/SwitchRow.swift @@ -0,0 +1,71 @@ +// +// SwitchRow.swift +// QuickTableViewController +// +// Created by Ben on 01/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import Foundation + +/// A struct that represents a row with a switch. +public struct SwitchRow: Row, Equatable, IconEnabled { + + /// The title text of the row. + public var title: String = "" + + /// Subtitle is disabled in SwitchRow. + public let subtitle: Subtitle? = nil + + /// The icon of the row. + public var icon: Icon? + + /// The state of the switch. + public var switchValue: Bool = false { + didSet { + action?(self) + } + } + + /// The value is **SwitchCell**, as the reuse identifier of the table view cell to display the row. + public let cellReuseIdentifier: String = String(describing: SwitchCell.self) + + /// A closure that will be invoked when the switchValue is changed. + public var action: ((Row) -> Void)? + + /// + public init(title: String, switchValue: Bool, icon: Icon? = nil, action: ((Row) -> Void)?) { + self.title = title + self.switchValue = switchValue + self.icon = icon + self.action = action + } + + private init() {} + + // MARK: Equatable + + /// Returns true iff `lhs` and `rhs` have equal titles, switch values, and icons. + public static func == (lhs: SwitchRow, rhs: SwitchRow) -> Bool { + return lhs.title == rhs.title && lhs.switchValue == rhs.switchValue && lhs.icon == rhs.icon + } + +} diff --git a/Source/QuickTableViewCell.swift b/Source/TapActionCell.swift similarity index 68% rename from Source/QuickTableViewCell.swift rename to Source/TapActionCell.swift index f0360743..7b870af8 100644 --- a/Source/QuickTableViewCell.swift +++ b/Source/TapActionCell.swift @@ -1,5 +1,5 @@ // -// QuickTableViewCell.swift +// TapActionCell.swift // QuickTableViewController // // Created by Ben on 03/09/2015. @@ -69,42 +69,3 @@ open class TapActionCell: UITableViewCell { } } - - -// MARK: - SwitchCell - - -/// A `UITableViewCell` subclass that shows a `UISwitch` as the `accessoryView`. -open class SwitchCell: UITableViewCell { - - /// A `UISwitch` as the `accessoryView`. - public let switchControl = UISwitch() - - // MARK: Initializer - - /** - Overrides `UITableViewCell`'s designated initializer. - - - parameter style: Unused. It always uses `UITableViewCellStyle.Default`. - - parameter reuseIdentifier: A string used to identify the cell object if it is to be reused for drawing multiple rows of a table view. - - - returns: An initialized `SwitchCell` object. - */ - override public init(style: UITableViewCellStyle, reuseIdentifier: String?) { - super.init(style: .default, reuseIdentifier: reuseIdentifier) - accessoryView = switchControl - } - - /** - Overrides the designated initializer that returns an object initialized from data in a given unarchiver. - - - parameter aDecoder: An unarchiver object. - - - returns: `self`, initialized using the data in decoder. - */ - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - accessoryView = switchControl - } - -} diff --git a/Source/TapActionRow.swift b/Source/TapActionRow.swift new file mode 100644 index 00000000..c38abf18 --- /dev/null +++ b/Source/TapActionRow.swift @@ -0,0 +1,52 @@ +// +// TapActionRow.swift +// QuickTableViewController +// +// Created by Ben on 01/09/2015. +// Copyright (c) 2015 bcylin. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +// SOFTWARE. +// + +import Foundation + +/// A struct that represents a row that triggers certain action when seleced. +public struct TapActionRow: Row, Equatable { + + /// The title text of the row. + public var title: String = "" + + /// Subtitle is disabled in TapActionRow. + public let subtitle: Subtitle? = nil + + /// The value is **TapActionCell**, as the reuse identifier of the table view cell to display the row. + public let cellReuseIdentifier: String = String(describing: TapActionCell.self) + + /// A closure as the tap action when the row is selected. + public var action: ((Row) -> Void)? + + /// + public init(title: String, action: ((Row) -> Void)?) { + self.title = title + self.action = action + } + + private init() {} + +} From ef0cc70b9759677c7a06ea8c53ec3b5917582769 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 10 Apr 2017 20:47:09 +0800 Subject: [PATCH 07/14] Update to danger (4.3.3) --- Dangerfile | 12 ++++++------ Gemfile | 3 +-- Gemfile.lock | 30 ++++++++++++++++-------------- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Dangerfile b/Dangerfile index 9f24bb4e..8489c3a4 100644 --- a/Dangerfile +++ b/Dangerfile @@ -2,23 +2,23 @@ # Sometimes it's a README fix, or something like that - which isn't relevant for # including in a project's CHANGELOG for example -declared_trivial = (github.pr_title + github.pr_body).include?("#trivial") +declared_trivial = (github.pr_title + github.pr_body).include? "#trivial" # Make it more obvious that a PR is a work in progress and shouldn't be merged yet -warn("PR is classed as Work in Progress") if pr_title.include? "[WIP]" +warn "PR is classed as Work in Progress" if github.pr_title.include? "[WIP]" # Warn when there is a big PR -warn("Big PR") if lines_of_code > 500 +warn "Big PR" if git.lines_of_code > 500 # Ensure there is a summary for a PR -fail "Please provide a summary in the Pull Request description" if github.pr_body.length < 1 +fail "Please provide a summary in the Pull Request description" if github.pr_body.length < 5 # Add a CHANGELOG entry for app changes if git.lines_of_code > 50 && !git.modified_files.include?("CHANGELOG.md") && !declared_trivial - fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/bcylin/QuickTableViewController/blob/develop/CHANGELOG.md).") + fail "Please update [CHANGELOG.md](https://github.com/bcylin/QuickTableViewController/blob/develop/CHANGELOG.md).", sticky: true end # Ensure a clean commits history if git.commits.any? { |c| c.message =~ /^Merge branch/ } - fail('Please rebase to get rid of the merge commits in this PR') + fail "Please rebase to get rid of the merge commits in this PR", sticky: true end diff --git a/Gemfile b/Gemfile index 8b5cee1a..ceed83c8 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,8 @@ source "http://rubygems.org" ruby "2.3.1" -gem "bundler" gem "cocoapods", "~> 1.1.0" -gem "danger", "~> 4.0.0" +gem "danger" gem "jazzy", "~> 0.7.0" gem "rake" gem "scan" diff --git a/Gemfile.lock b/Gemfile.lock index c6139efd..f399333a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,8 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) + addressable (2.5.1) + public_suffix (~> 2.0, >= 2.0.2) babosa (1.0.2) claide (1.0.1) claide-plugins (0.9.2) @@ -48,6 +49,7 @@ GEM netrc (= 0.7.8) cocoapods-try (1.1.0) colored (1.2) + colored2 (3.1.2) commander (4.4.0) highline (~> 1.7.2) cork (0.2.0) @@ -57,10 +59,10 @@ GEM commander (>= 4.3.5) highline (>= 1.7.1) security - danger (4.0.0) + danger (4.3.3) claide (~> 1.0) claide-plugins (>= 0.9.2) - colored (~> 1.2) + colored2 (~> 3.1) cork (~> 0.1) faraday (~> 0.9) faraday-http-cache (~> 1.0) @@ -70,7 +72,7 @@ GEM terminal-table (~> 1) escape (0.0.4) excon (0.54.0) - faraday (0.9.2) + faraday (0.12.0.1) multipart-post (>= 1.2, < 3) faraday-http-cache (1.3.1) faraday (~> 0.8) @@ -103,7 +105,7 @@ GEM sqlite3 (~> 1.3) xcinvoke (~> 0.2.1) json (1.8.3) - kramdown (1.12.0) + kramdown (1.13.2) liferaft (0.0.4) mini_portile2 (2.1.0) minitest (5.9.1) @@ -116,19 +118,20 @@ GEM nokogiri (1.6.8) mini_portile2 (~> 2.1.0) pkg-config (~> 1.1.7) - octokit (4.4.1) - sawyer (~> 0.7.0, >= 0.5.3) + octokit (4.7.0) + sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) pkg-config (1.1.7) plist (3.2.0) + public_suffix (2.0.5) rake (11.3.0) redcarpet (3.3.4) rouge (1.11.1) rubyzip (1.1.7) sass (3.4.22) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) scan (0.13.1) fastlane_core (>= 0.52.1, < 1.0.0) slack-notifier (~> 1.3) @@ -148,7 +151,7 @@ GEM thread_safe (0.3.5) tzinfo (1.2.2) thread_safe (~> 0.1) - unicode-display_width (1.1.1) + unicode-display_width (1.1.3) xcinvoke (0.2.1) liferaft (~> 0.0.4) xcodeproj (1.3.3) @@ -164,9 +167,8 @@ PLATFORMS ruby DEPENDENCIES - bundler cocoapods (~> 1.1.0) - danger (~> 4.0.0) + danger jazzy (~> 0.7.0) rake scan @@ -177,4 +179,4 @@ RUBY VERSION ruby 2.3.1p112 BUNDLED WITH - 1.13.6 + 1.14.6 From 44eb88a8fc4b2a6b5342a804c3c894dfcf95176e Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 11 Apr 2017 00:37:06 +0800 Subject: [PATCH 08/14] Update to fastlane (2.26.1) --- .travis.yml | 2 +- Gemfile | 2 +- Gemfile.lock | 124 +++++++++++++++++++++++++++++++++++++++------------ Scanfile | 1 + 4 files changed, 98 insertions(+), 31 deletions(-) diff --git a/.travis.yml b/.travis.yml index 977c2fd8..ca875833 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ before_script: - if [ -n "$DANGER_GITHUB_API_TOKEN" ]; then bundle exec danger; fi script: - bundle exec rake ci:build[Example] - - bundle exec scan --scheme QuickTableViewController-iOS + - bundle exec fastlane scan --scheme QuickTableViewController-iOS - make -B carthage - make -B docs after_success: diff --git a/Gemfile b/Gemfile index ceed83c8..2a6e196e 100644 --- a/Gemfile +++ b/Gemfile @@ -3,8 +3,8 @@ ruby "2.3.1" gem "cocoapods", "~> 1.1.0" gem "danger" +gem "fastlane" gem "jazzy", "~> 0.7.0" gem "rake" -gem "scan" gem "slather" gem "xcpretty" diff --git a/Gemfile.lock b/Gemfile.lock index f399333a..eb2c9982 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -50,15 +50,10 @@ GEM cocoapods-try (1.1.0) colored (1.2) colored2 (3.1.2) - commander (4.4.0) + commander-fastlane (4.4.4) highline (~> 1.7.2) cork (0.2.0) colored (~> 1.2) - credentials_manager (0.16.2) - colored - commander (>= 4.3.5) - highline (>= 1.7.1) - security danger (4.3.3) claide (~> 1.0) claide-plugins (>= 0.9.2) @@ -70,31 +65,80 @@ GEM kramdown (~> 1.5) octokit (~> 4.2) terminal-table (~> 1) + domain_name (0.5.20170404) + unf (>= 0.0.5, < 1.0.0) + dotenv (2.2.0) escape (0.0.4) - excon (0.54.0) + excon (0.55.0) faraday (0.12.0.1) multipart-post (>= 1.2, < 3) + faraday-cookie_jar (0.0.6) + faraday (>= 0.7.4) + http-cookie (~> 1.0.0) faraday-http-cache (1.3.1) faraday (~> 0.8) - fastlane_core (0.53.0) - babosa + faraday_middleware (0.11.0.1) + faraday (>= 0.7.4, < 1.0) + fastimage (2.1.0) + fastlane (2.26.1) + activesupport (< 5) + addressable (>= 2.3, < 3.0.0) + babosa (>= 1.0.2, < 2.0.0) + bundler (>= 1.12.0, < 2.0.0) colored - commander (>= 4.4.0, <= 5.0.0) - credentials_manager (>= 0.16.2, < 1.0.0) - excon (>= 0.45.0, < 1.0) + commander-fastlane (>= 4.4.0, < 5.0.0) + dotenv (>= 2.1.1, < 3.0.0) + excon (>= 0.45.0, < 1.0.0) + faraday (~> 0.9) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 0.9) + fastimage (>= 1.6) gh_inspector (>= 1.0.1, < 2.0.0) - highline (>= 1.7.2) - json + google-api-client (~> 0.9.2) + highline (>= 1.7.2, < 2.0.0) + json (< 3.0.0) + mini_magick (~> 4.5.1) multi_json + multi_xml (~> 0.5) + multipart-post (~> 2.0.0) plist (>= 3.1.0, < 4.0.0) - rubyzip (~> 1.1.6) + rubyzip (>= 1.1.0, < 2.0.0) + security (= 0.1.3) + slack-notifier (>= 1.3, < 2.0.0) + terminal-notifier (>= 1.6.2, < 2.0.0) terminal-table (>= 1.4.5, < 2.0.0) + tty-screen (~> 0.5.0) + word_wrap (~> 1.0.0) + xcodeproj (>= 0.20, < 2.0.0) + xcpretty (>= 0.2.4, < 1.0.0) + xcpretty-travis-formatter (>= 0.0.3) fourflusher (2.0.1) fuzzy_match (2.0.4) gh_inspector (1.0.2) git (1.3.0) + google-api-client (0.9.28) + addressable (~> 2.3) + googleauth (~> 0.5) + httpclient (~> 2.7) + hurley (~> 0.1) + memoist (~> 0.11) + mime-types (>= 1.6) + representable (~> 2.3.0) + retriable (~> 2.0) + googleauth (0.5.1) + faraday (~> 0.9) + jwt (~> 1.4) + logging (~> 2.0) + memoist (~> 0.12) + multi_json (~> 1.11) + os (~> 0.9) + signet (~> 0.7) highline (1.7.8) - i18n (0.7.0) + http-cookie (1.0.3) + domain_name (~> 0.5) + httpclient (2.8.3) + hurley (0.2) + i18n (0.8.1) jazzy (0.7.2) cocoapods (~> 1.0) mustache (~> 0.99) @@ -104,13 +148,24 @@ GEM sass (~> 3.4) sqlite3 (~> 1.3) xcinvoke (~> 0.2.1) - json (1.8.3) + json (2.0.3) + jwt (1.5.6) kramdown (1.13.2) liferaft (0.0.4) + little-plugger (1.1.4) + logging (2.2.1) + little-plugger (~> 1.1) + multi_json (~> 1.10) + memoist (0.15.0) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mini_magick (4.5.1) mini_portile2 (2.1.0) minitest (5.9.1) molinillo (0.5.2) multi_json (1.12.1) + multi_xml (0.6.0) multipart-post (2.0.0) mustache (0.99.8) nap (1.1.0) @@ -121,24 +176,27 @@ GEM octokit (4.7.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) + os (0.9.6) pkg-config (1.1.7) plist (3.2.0) public_suffix (2.0.5) rake (11.3.0) redcarpet (3.3.4) + representable (2.3.0) + uber (~> 0.0.7) + retriable (2.1.0) rouge (1.11.1) - rubyzip (1.1.7) + rubyzip (1.2.1) sass (3.4.22) sawyer (0.8.1) addressable (>= 2.3.5, < 2.6) faraday (~> 0.8, < 1.0) - scan (0.13.1) - fastlane_core (>= 0.52.1, < 1.0.0) - slack-notifier (~> 1.3) - terminal-table - xcpretty (>= 0.2.2) - xcpretty-travis-formatter (>= 0.0.3) security (0.1.3) + signet (0.7.3) + addressable (~> 2.3) + faraday (~> 0.9) + jwt (~> 1.5) + multi_json (~> 1.10) slack-notifier (1.5.1) slather (2.3.0) activesupport (>= 4.0.2, < 5) @@ -146,19 +204,27 @@ GEM nokogiri (~> 1.6.3) xcodeproj (>= 0.20, < 2.0.0) sqlite3 (1.3.11) + terminal-notifier (1.7.1) terminal-table (1.7.3) unicode-display_width (~> 1.1.1) - thread_safe (0.3.5) - tzinfo (1.2.2) + thread_safe (0.3.6) + tty-screen (0.5.0) + tzinfo (1.2.3) thread_safe (~> 0.1) + uber (0.0.15) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.2) unicode-display_width (1.1.3) + word_wrap (1.0.0) xcinvoke (0.2.1) liferaft (~> 0.0.4) xcodeproj (1.3.3) activesupport (>= 3) claide (>= 1.0.1, < 2.0) - colored (~> 1.2) - xcpretty (0.2.4) + colored2 (~> 3.1) + nanaimo (~> 0.2.3) + xcpretty (0.2.6) rouge (~> 1.8) xcpretty-travis-formatter (0.0.4) xcpretty (~> 0.2, >= 0.0.7) @@ -169,9 +235,9 @@ PLATFORMS DEPENDENCIES cocoapods (~> 1.1.0) danger + fastlane jazzy (~> 0.7.0) rake - scan slather xcpretty diff --git a/Scanfile b/Scanfile index 54e9045a..14b2b1a6 100644 --- a/Scanfile +++ b/Scanfile @@ -9,3 +9,4 @@ scheme "QuickTableViewController-iOS" code_coverage true clean true +device "iPhone SE" From 700321695d58354ca90ad28bcf5da8ba8a4ccdd7 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 11 Apr 2017 00:40:43 +0800 Subject: [PATCH 09/14] Update to jazzy (0.7.5) --- Gemfile | 2 +- Gemfile.lock | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Gemfile b/Gemfile index 2a6e196e..6e3253e0 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,7 @@ ruby "2.3.1" gem "cocoapods", "~> 1.1.0" gem "danger" gem "fastlane" -gem "jazzy", "~> 0.7.0" +gem "jazzy" gem "rake" gem "slather" gem "xcpretty" diff --git a/Gemfile.lock b/Gemfile.lock index eb2c9982..e131a381 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,9 @@ GEM remote: http://rubygems.org/ specs: - activesupport (4.2.7.1) + CFPropertyList (2.3.5) + activesupport (4.2.8) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) @@ -114,7 +114,7 @@ GEM xcpretty-travis-formatter (>= 0.0.3) fourflusher (2.0.1) fuzzy_match (2.0.4) - gh_inspector (1.0.2) + gh_inspector (1.0.3) git (1.3.0) google-api-client (0.9.28) addressable (~> 2.3) @@ -139,7 +139,7 @@ GEM httpclient (2.8.3) hurley (0.2) i18n (0.8.1) - jazzy (0.7.2) + jazzy (0.7.5) cocoapods (~> 1.0) mustache (~> 0.99) open4 @@ -147,13 +147,13 @@ GEM rouge (~> 1.5) sass (~> 3.4) sqlite3 (~> 1.3) - xcinvoke (~> 0.2.1) - json (2.0.3) + xcinvoke (~> 0.3.0) + json (2.0.4) jwt (1.5.6) kramdown (1.13.2) - liferaft (0.0.4) + liferaft (0.0.6) little-plugger (1.1.4) - logging (2.2.1) + logging (2.2.2) little-plugger (~> 1.1) multi_json (~> 1.10) memoist (0.15.0) @@ -162,32 +162,31 @@ GEM mime-types-data (3.2016.0521) mini_magick (4.5.1) mini_portile2 (2.1.0) - minitest (5.9.1) + minitest (5.10.1) molinillo (0.5.2) multi_json (1.12.1) multi_xml (0.6.0) multipart-post (2.0.0) mustache (0.99.8) + nanaimo (0.2.3) nap (1.1.0) netrc (0.7.8) - nokogiri (1.6.8) + nokogiri (1.7.1) mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) octokit (4.7.0) sawyer (~> 0.8.0, >= 0.5.3) open4 (1.3.4) os (0.9.6) - pkg-config (1.1.7) plist (3.2.0) public_suffix (2.0.5) - rake (11.3.0) - redcarpet (3.3.4) + rake (12.0.0) + redcarpet (3.4.0) representable (2.3.0) uber (~> 0.0.7) retriable (2.1.0) rouge (1.11.1) rubyzip (1.2.1) - sass (3.4.22) + sass (3.4.23) sawyer (0.8.1) addressable (>= 2.3.5, < 2.6) faraday (~> 0.8, < 1.0) @@ -198,12 +197,13 @@ GEM jwt (~> 1.5) multi_json (~> 1.10) slack-notifier (1.5.1) - slather (2.3.0) + slather (2.4.1) + CFPropertyList (~> 2.2) activesupport (>= 4.0.2, < 5) clamp (~> 0.6) - nokogiri (~> 1.6.3) - xcodeproj (>= 0.20, < 2.0.0) - sqlite3 (1.3.11) + nokogiri (~> 1.6) + xcodeproj (~> 1.4) + sqlite3 (1.3.13) terminal-notifier (1.7.1) terminal-table (1.7.3) unicode-display_width (~> 1.1.1) @@ -214,13 +214,13 @@ GEM uber (0.0.15) unf (0.1.4) unf_ext - unf_ext (0.0.7.2) + unf_ext (0.0.7.3) unicode-display_width (1.1.3) word_wrap (1.0.0) - xcinvoke (0.2.1) - liferaft (~> 0.0.4) - xcodeproj (1.3.3) - activesupport (>= 3) + xcinvoke (0.3.0) + liferaft (~> 0.0.6) + xcodeproj (1.4.4) + CFPropertyList (~> 2.3.3) claide (>= 1.0.1, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.2.3) @@ -236,7 +236,7 @@ DEPENDENCIES cocoapods (~> 1.1.0) danger fastlane - jazzy (~> 0.7.0) + jazzy rake slather xcpretty From d4e8f47cafae458125e7b375cc7dd8c919d03661 Mon Sep 17 00:00:00 2001 From: Ben Date: Tue, 11 Apr 2017 16:45:22 +0800 Subject: [PATCH 10/14] Update to Quick (1.1.0) and Nimble (6.1.0) --- Podfile | 13 ++----------- Podfile.lock | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/Podfile b/Podfile index ab2dcd73..a553a573 100644 --- a/Podfile +++ b/Podfile @@ -5,20 +5,11 @@ workspace "QuickTableViewController" target "QuickTableViewControllerTests-iOS" do project "QuickTableViewController" - pod "Nimble", git: "https://github.com/Quick/Nimble.git", tag: "v5.0.0" - pod "Quick", git: "https://github.com/Quick/Quick.git", tag: "v0.10.0" + pod "Nimble", git: "https://github.com/Quick/Nimble.git", tag: "v6.1.0" + pod "Quick", git: "https://github.com/Quick/Quick.git", tag: "v1.1.0" end target :Example do project "Example" pod "QuickTableViewController", path: "./" end - - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings["SWIFT_VERSION"] = "3.0" - end - end -end diff --git a/Podfile.lock b/Podfile.lock index 3ae3b4f5..f3cd7b50 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,36 +1,36 @@ PODS: - - Nimble (5.0.0) - - Quick (0.10.0) + - Nimble (6.1.0) + - Quick (1.1.0) - QuickTableViewController (0.5.1) DEPENDENCIES: - - Nimble (from `https://github.com/Quick/Nimble.git`, tag `v5.0.0`) - - Quick (from `https://github.com/Quick/Quick.git`, tag `v0.10.0`) + - Nimble (from `https://github.com/Quick/Nimble.git`, tag `v6.1.0`) + - Quick (from `https://github.com/Quick/Quick.git`, tag `v1.1.0`) - QuickTableViewController (from `./`) EXTERNAL SOURCES: Nimble: :git: https://github.com/Quick/Nimble.git - :tag: v5.0.0 + :tag: v6.1.0 Quick: :git: https://github.com/Quick/Quick.git - :tag: v0.10.0 + :tag: v1.1.0 QuickTableViewController: :path: "./" CHECKOUT OPTIONS: Nimble: :git: https://github.com/Quick/Nimble.git - :tag: v5.0.0 + :tag: v6.1.0 Quick: :git: https://github.com/Quick/Quick.git - :tag: v0.10.0 + :tag: v1.1.0 SPEC CHECKSUMS: - Nimble: 56fc9f5020effa2206de22c3dd910f4fb011b92f - Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa + Nimble: 46fc2a2c3f2f5bb5e2d7e89756fb710c1457f27a + Quick: 4700beb8056662b579facd79eaca7f04fb3d48e6 QuickTableViewController: 7f984b4af21e9f2fc7ef840e40a7f46a0198039a -PODFILE CHECKSUM: 700bf6791293c4cd4f5b58d4e2d1c0a00575e529 +PODFILE CHECKSUM: a12ebb981507415ad7c19091d127cf3c2f6c6af0 COCOAPODS: 1.1.1 From dbfc4adfb49dd88f09ae139cb905c33e42ec14b0 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 12 Apr 2017 14:47:22 +0800 Subject: [PATCH 11/14] Update to CocoaPods (1.2.1) --- Example.xcodeproj/project.pbxproj | 2 +- Gemfile | 2 +- Gemfile.lock | 26 ++++++++++--------- Podfile.lock | 2 +- .../project.pbxproj | 2 +- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Example.xcodeproj/project.pbxproj b/Example.xcodeproj/project.pbxproj index 363c02e1..7aba925b 100644 --- a/Example.xcodeproj/project.pbxproj +++ b/Example.xcodeproj/project.pbxproj @@ -171,7 +171,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; A43CA00841AB7E30DF4064FE /* [CP] Embed Pods Frameworks */ = { diff --git a/Gemfile b/Gemfile index 6e3253e0..bc21a22f 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "http://rubygems.org" ruby "2.3.1" -gem "cocoapods", "~> 1.1.0" +gem "cocoapods" gem "danger" gem "fastlane" gem "jazzy" diff --git a/Gemfile.lock b/Gemfile.lock index e131a381..a214a6a3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,35 +16,36 @@ GEM nap open4 (~> 1.3) clamp (0.6.5) - cocoapods (1.1.1) + cocoapods (1.2.1) activesupport (>= 4.0.2, < 5) claide (>= 1.0.1, < 2.0) - cocoapods-core (= 1.1.1) + cocoapods-core (= 1.2.1) cocoapods-deintegrate (>= 1.0.1, < 2.0) - cocoapods-downloader (>= 1.1.2, < 2.0) + cocoapods-downloader (>= 1.1.3, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) cocoapods-search (>= 1.0.0, < 2.0) cocoapods-stats (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.1.1, < 2.0) + cocoapods-trunk (>= 1.2.0, < 2.0) cocoapods-try (>= 1.1.0, < 2.0) - colored (~> 1.2) + colored2 (~> 3.1) escape (~> 0.0.4) fourflusher (~> 2.0.1) gh_inspector (~> 1.0) - molinillo (~> 0.5.1) + molinillo (~> 0.5.7) nap (~> 1.0) - xcodeproj (>= 1.3.3, < 2.0) - cocoapods-core (1.1.1) + ruby-macho (~> 1.1) + xcodeproj (>= 1.4.4, < 2.0) + cocoapods-core (1.2.1) activesupport (>= 4.0.2, < 5) fuzzy_match (~> 2.0.4) nap (~> 1.0) cocoapods-deintegrate (1.0.1) - cocoapods-downloader (1.1.2) + cocoapods-downloader (1.1.3) cocoapods-plugins (1.0.0) nap cocoapods-search (1.0.0) cocoapods-stats (1.0.0) - cocoapods-trunk (1.1.1) + cocoapods-trunk (1.2.0) nap (>= 0.8, < 2.0) netrc (= 0.7.8) cocoapods-try (1.1.0) @@ -163,7 +164,7 @@ GEM mini_magick (4.5.1) mini_portile2 (2.1.0) minitest (5.10.1) - molinillo (0.5.2) + molinillo (0.5.7) multi_json (1.12.1) multi_xml (0.6.0) multipart-post (2.0.0) @@ -185,6 +186,7 @@ GEM uber (~> 0.0.7) retriable (2.1.0) rouge (1.11.1) + ruby-macho (1.1.0) rubyzip (1.2.1) sass (3.4.23) sawyer (0.8.1) @@ -233,7 +235,7 @@ PLATFORMS ruby DEPENDENCIES - cocoapods (~> 1.1.0) + cocoapods danger fastlane jazzy diff --git a/Podfile.lock b/Podfile.lock index f3cd7b50..4bc80750 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -33,4 +33,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: a12ebb981507415ad7c19091d127cf3c2f6c6af0 -COCOAPODS: 1.1.1 +COCOAPODS: 1.2.1 diff --git a/QuickTableViewController.xcodeproj/project.pbxproj b/QuickTableViewController.xcodeproj/project.pbxproj index 87aec68e..499f0e1e 100644 --- a/QuickTableViewController.xcodeproj/project.pbxproj +++ b/QuickTableViewController.xcodeproj/project.pbxproj @@ -365,7 +365,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ From 96bd49fe1889ea86e706ba6cc189f3747a7e6330 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 12 Apr 2017 15:27:23 +0800 Subject: [PATCH 12/14] Use Xcode 8.3 on Travis CI --- .travis.yml | 4 +--- Makefile | 11 ++++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ca875833..ec1691d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode8 +osx_image: xcode8.3 matrix: include: - env: VERSION=latest @@ -10,8 +10,6 @@ cache: - Pods before_install: - export LANG=en_US.UTF-8 - - brew tap homebrew/bundle - - brew bundle install: - bundle install --without development --deployment --jobs=3 --retry=3 - bundle exec pod install diff --git a/Makefile b/Makefile index 985c2aba..05ef9596 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ default: test -test: test-framework + +test: + bundle exec rake ci:build[Example] + bundle exec fastlane scan --scheme QuickTableViewController-iOS + make -B carthage + make -B docs bump: ifeq (,$(strip $(version))) @@ -9,13 +14,13 @@ else endif carthage: - set -o pipefail && carthage build --no-skip-current --verbose | xcpretty -c + set -o pipefail && carthage build --no-skip-current --verbose | bundle exec xcpretty -c coverage: bundle exec slather coverage -s --input-format profdata --workspace QuickTableViewController.xcworkspace --scheme QuickTableViewController-iOS QuickTableViewController.xcodeproj test-framework: - bundle exec scan + bundle exec fastlane scan build-example: xcodebuild -workspace QuickTableViewController.xcworkspace -scheme Example -sdk iphonesimulator -destination "name=iPhone 6s,OS=latest" clean build | xcpretty -c && exit ${PIPESTATUS[0]} From 911495a34e7b404bf22a18d1c7f1a59ad754e2c1 Mon Sep 17 00:00:00 2001 From: Paul Chou Date: Fri, 14 Apr 2017 17:48:38 +0800 Subject: [PATCH 13/14] change imageName, highlightedImageName public --- Source/Icon.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Icon.swift b/Source/Icon.swift index b989fb3b..dc12c340 100644 --- a/Source/Icon.swift +++ b/Source/Icon.swift @@ -51,8 +51,8 @@ public struct Icon: Equatable { fileprivate var _highlightedImage: UIImage? // swiftlint:eable variable_name - internal private(set) var imageName: String? - internal var highlightedImageName: String { + public private(set) var imageName: String? + public var highlightedImageName: String { if let name = imageName { return name + "-highlighted" } else { From dade369e85a5925d3c5f073caecac534220a5c81 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 14 Apr 2017 18:15:15 +0800 Subject: [PATCH 14/14] Bump version to 0.5.2 --- .jazzy.yml | 2 +- CHANGELOG.md | 7 +++++++ Example/Info.plist | 2 +- Podfile.lock | 4 ++-- QuickTableViewController.podspec | 2 +- QuickTableViewController/Info.plist | 2 +- QuickTableViewControllerTests/Info.plist | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.jazzy.yml b/.jazzy.yml index 93cbc7df..945b596a 100644 --- a/.jazzy.yml +++ b/.jazzy.yml @@ -5,6 +5,6 @@ github_url: https://github.com/bcylin/QuickTableViewController github_file_prefix: https://github.com/bcylin/QuickTableViewController/blob/develop xcodebuild_arguments: [-project, QuickTableViewController.xcodeproj, -scheme, QuickTableViewController-iOS] module: QuickTableViewController -module_version: 0.5.1 +module_version: 0.5.2 output: docs/output theme: fullwidth diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b3b685e..01485a11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## v0.5.2 + +#### Changes + +* Xcode 8.3 +* Make the image name and highlighted image name of `Icon` public readonly + ## v0.5.1 #### Changes diff --git a/Example/Info.plist b/Example/Info.plist index 556b0c0d..2be2386e 100644 --- a/Example/Info.plist +++ b/Example/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.5.1 + 0.5.2 CFBundleVersion 101 LSRequiresIPhoneOS diff --git a/Podfile.lock b/Podfile.lock index 4bc80750..d13c91bb 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,7 +1,7 @@ PODS: - Nimble (6.1.0) - Quick (1.1.0) - - QuickTableViewController (0.5.1) + - QuickTableViewController (0.5.2) DEPENDENCIES: - Nimble (from `https://github.com/Quick/Nimble.git`, tag `v6.1.0`) @@ -29,7 +29,7 @@ CHECKOUT OPTIONS: SPEC CHECKSUMS: Nimble: 46fc2a2c3f2f5bb5e2d7e89756fb710c1457f27a Quick: 4700beb8056662b579facd79eaca7f04fb3d48e6 - QuickTableViewController: 7f984b4af21e9f2fc7ef840e40a7f46a0198039a + QuickTableViewController: cbaacea5a467f2e1bf83d13a716c5bbd6bc9f6b2 PODFILE CHECKSUM: a12ebb981507415ad7c19091d127cf3c2f6c6af0 diff --git a/QuickTableViewController.podspec b/QuickTableViewController.podspec index 205faf02..fc6ca814 100644 --- a/QuickTableViewController.podspec +++ b/QuickTableViewController.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "QuickTableViewController" - s.version = "0.5.1" + s.version = "0.5.2" s.summary = "A simple way to create a UITableView for settings." s.screenshots = "https://bcylin.github.io/QuickTableViewController/img/screenshot.png" diff --git a/QuickTableViewController/Info.plist b/QuickTableViewController/Info.plist index 504fc36a..0d4fc0a8 100644 --- a/QuickTableViewController/Info.plist +++ b/QuickTableViewController/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.5.1 + 0.5.2 CFBundleSignature ???? CFBundleVersion diff --git a/QuickTableViewControllerTests/Info.plist b/QuickTableViewControllerTests/Info.plist index 4e4720dd..c66dcccd 100644 --- a/QuickTableViewControllerTests/Info.plist +++ b/QuickTableViewControllerTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 0.5.1 + 0.5.2 CFBundleSignature ???? CFBundleVersion