From fcf325605c3e38d63070dd9212423d26e0c2f572 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 14:31:01 +0800 Subject: [PATCH 01/14] Removed include folder --- TORoundedButton/{Include => }/TORoundedButton.h | 0 TORoundedButtonExample.xcodeproj/project.pbxproj | 10 +--------- 2 files changed, 1 insertion(+), 9 deletions(-) rename TORoundedButton/{Include => }/TORoundedButton.h (100%) diff --git a/TORoundedButton/Include/TORoundedButton.h b/TORoundedButton/TORoundedButton.h similarity index 100% rename from TORoundedButton/Include/TORoundedButton.h rename to TORoundedButton/TORoundedButton.h diff --git a/TORoundedButtonExample.xcodeproj/project.pbxproj b/TORoundedButtonExample.xcodeproj/project.pbxproj index 74d6d1f..d198e43 100644 --- a/TORoundedButtonExample.xcodeproj/project.pbxproj +++ b/TORoundedButtonExample.xcodeproj/project.pbxproj @@ -162,20 +162,12 @@ 22700660226CA322003492CB /* TORoundedButton */ = { isa = PBXGroup; children = ( - FC2924342368A43A00B92058 /* Include */, + 22700661226CA35D003492CB /* TORoundedButton.h */, 22700662226CA35D003492CB /* TORoundedButton.m */, ); path = TORoundedButton; sourceTree = ""; }; - FC2924342368A43A00B92058 /* Include */ = { - isa = PBXGroup; - children = ( - 22700661226CA35D003492CB /* TORoundedButton.h */, - ); - path = Include; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ From 215cc9289271f3636e103eab64756b3d5f2f3ff9 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 14:34:31 +0800 Subject: [PATCH 02/14] Added dark mode support to sample app --- .../Base.lproj/LaunchScreen.storyboard | 18 +++++++++++---- .../Base.lproj/Main.storyboard | 23 +++++++++++-------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/TORoundedButtonExample/Base.lproj/LaunchScreen.storyboard b/TORoundedButtonExample/Base.lproj/LaunchScreen.storyboard index bfa3612..24d5aca 100644 --- a/TORoundedButtonExample/Base.lproj/LaunchScreen.storyboard +++ b/TORoundedButtonExample/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,11 @@ - - + + + - + + + @@ -11,10 +14,10 @@ - + - + @@ -22,4 +25,9 @@ + + + + + diff --git a/TORoundedButtonExample/Base.lproj/Main.storyboard b/TORoundedButtonExample/Base.lproj/Main.storyboard index 92141e4..a763b67 100644 --- a/TORoundedButtonExample/Base.lproj/Main.storyboard +++ b/TORoundedButtonExample/Base.lproj/Main.storyboard @@ -1,12 +1,11 @@ - - - - + + - + + @@ -19,7 +18,7 @@ - + @@ -30,23 +29,22 @@ - + + - @@ -58,4 +56,9 @@ + + + + + From bd269608031aee49cb01a1a9dfb8542c60e9492b Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:11:17 +0800 Subject: [PATCH 03/14] Added light and dark mode support to storyboard --- TORoundedButtonExample/Base.lproj/Main.storyboard | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TORoundedButtonExample/Base.lproj/Main.storyboard b/TORoundedButtonExample/Base.lproj/Main.storyboard index a763b67..9a74d36 100644 --- a/TORoundedButtonExample/Base.lproj/Main.storyboard +++ b/TORoundedButtonExample/Base.lproj/Main.storyboard @@ -20,6 +20,7 @@ + @@ -60,5 +61,8 @@ + + + From d6d9192ee27f532b472d1617cd0abb3cdb4d7e81 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:11:50 +0800 Subject: [PATCH 04/14] Updated schemes for Xcode 12 --- .../xcschemes/TORoundedButtonExample.xcscheme | 2 +- .../TORoundedButtonFramework.xcscheme | 6 +----- .../xcschemes/TORoundedButtonTests.xcscheme | 20 +------------------ 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonExample.xcscheme b/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonExample.xcscheme index a00b722..ab44cd3 100644 --- a/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonExample.xcscheme +++ b/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonExample.xcscheme @@ -1,6 +1,6 @@ - - - - - - - - @@ -60,15 +51,6 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - - - - From 86006d54633e798d8c41052a8f1a950fbe2cc0b3 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:12:12 +0800 Subject: [PATCH 05/14] Added dark mode color recalculation --- TORoundedButton/TORoundedButton.m | 1 + 1 file changed, 1 insertion(+) diff --git a/TORoundedButton/TORoundedButton.m b/TORoundedButton/TORoundedButton.m index 3c804e1..27937ed 100644 --- a/TORoundedButton/TORoundedButton.m +++ b/TORoundedButton/TORoundedButton.m @@ -161,6 +161,7 @@ - (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection { [super traitCollectionDidChange:previousTraitCollection]; [self setNeedsLayout]; + [self updateTappedTintColorForTintColor]; } - (void)updateTappedTintColorForTintColor From 0122f8583e98c35cf2d31e0d0524a33f85641000 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:12:42 +0800 Subject: [PATCH 06/14] Made framework dynamic --- .../project.pbxproj | 45 +++++++------------ 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/TORoundedButtonExample.xcodeproj/project.pbxproj b/TORoundedButtonExample.xcodeproj/project.pbxproj index d198e43..90bef4c 100644 --- a/TORoundedButtonExample.xcodeproj/project.pbxproj +++ b/TORoundedButtonExample.xcodeproj/project.pbxproj @@ -3,33 +3,25 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 52; objects = { /* Begin PBXBuildFile section */ - 220F9AB522784FD4001862A7 /* TORoundedButton.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 220F9AAE22784FD4001862A7 /* TORoundedButton.framework */; }; 220F9AB622784FD4001862A7 /* TORoundedButton.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 220F9AAE22784FD4001862A7 /* TORoundedButton.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 220F9ABC22784FF5001862A7 /* TORoundedButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22700662226CA35D003492CB /* TORoundedButton.m */; }; + 220F9ABC22784FF5001862A7 /* TORoundedButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22700662226CA35D003492CB /* TORoundedButton.m */; platformFilter = ios; }; 2270063E226CA24D003492CB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2270063D226CA24D003492CB /* AppDelegate.m */; }; 22700644226CA24D003492CB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 22700642226CA24D003492CB /* Main.storyboard */; }; 22700646226CA24E003492CB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 22700645226CA24E003492CB /* Assets.xcassets */; }; 22700649226CA24E003492CB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 22700647226CA24E003492CB /* LaunchScreen.storyboard */; }; 2270064C226CA24E003492CB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2270064B226CA24E003492CB /* main.m */; }; 22700656226CA24E003492CB /* TORoundedButtonExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 22700655226CA24E003492CB /* TORoundedButtonExampleTests.m */; }; - 22700663226CA35D003492CB /* TORoundedButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22700662226CA35D003492CB /* TORoundedButton.m */; }; + 2274936425849FA300FE4C74 /* TORoundedButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 22700662226CA35D003492CB /* TORoundedButton.m */; }; 22D23CC82276E73200EE65DD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22D23CC72276E73200EE65DD /* ViewController.m */; }; 22D23CCA2276E76A00EE65DD /* wallpaper.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 22D23CC92276E76900EE65DD /* wallpaper.jpg */; }; 22D935D122D237D800C26F18 /* TORoundedButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 22700661226CA35D003492CB /* TORoundedButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 220F9AB322784FD4001862A7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 22700631226CA24D003492CB /* Project object */; - proxyType = 1; - remoteGlobalIDString = 220F9AAD22784FD4001862A7; - remoteInfo = TORoundedButton; - }; 22700652226CA24E003492CB /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 22700631226CA24D003492CB /* Project object */; @@ -88,7 +80,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 220F9AB522784FD4001862A7 /* TORoundedButton.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -120,6 +111,7 @@ 2270063A226CA24D003492CB /* Products */, 220FC30922BC67FE00B5C284 /* CHANGELOG.md */, 220FC30822BC67E700B5C284 /* README.md */, + 2274935225849DE500FE4C74 /* Frameworks */, ); sourceTree = ""; }; @@ -168,6 +160,13 @@ path = TORoundedButton; sourceTree = ""; }; + 2274935225849DE500FE4C74 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -212,7 +211,6 @@ buildRules = ( ); dependencies = ( - 220F9AB422784FD4001862A7 /* PBXTargetDependency */, ); name = TORoundedButtonExample; productName = TORoundedButtonExample; @@ -243,7 +241,7 @@ 22700631226CA24D003492CB /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1220; ORGANIZATIONNAME = "Tim Oliver"; TargetAttributes = { 220F9AAD22784FD4001862A7 = { @@ -319,7 +317,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 22700663226CA35D003492CB /* TORoundedButton.m in Sources */, + 2274936425849FA300FE4C74 /* TORoundedButton.m in Sources */, 2270064C226CA24E003492CB /* main.m in Sources */, 22D23CC82276E73200EE65DD /* ViewController.m in Sources */, 2270063E226CA24D003492CB /* AppDelegate.m in Sources */, @@ -337,11 +335,6 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 220F9AB422784FD4001862A7 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 220F9AAD22784FD4001862A7 /* TORoundedButtonFramework */; - targetProxy = 220F9AB322784FD4001862A7 /* PBXContainerItemProxy */; - }; 22700653226CA24E003492CB /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 22700638226CA24D003492CB /* TORoundedButtonExample */; @@ -381,18 +374,15 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/TORoundedButtonFramework/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MACH_O_TYPE = staticlib; PRODUCT_BUNDLE_IDENTIFIER = dev.tim.TORoundedButton; PRODUCT_NAME = TORoundedButton; - SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; @@ -409,18 +399,15 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "$(SRCROOT)/TORoundedButtonFramework/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MACH_O_TYPE = staticlib; PRODUCT_BUNDLE_IDENTIFIER = dev.tim.TORoundedButton; PRODUCT_NAME = TORoundedButton; - SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; @@ -451,6 +438,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -511,6 +499,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; From ec0e6d49c59f4bf6db9bbe0836ff55b989409b73 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:14:14 +0800 Subject: [PATCH 07/14] Fixed up test target --- .../xcshareddata/xcschemes/TORoundedButtonTests.xcscheme | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme b/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme index 36dfe91..0168e75 100644 --- a/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme +++ b/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme @@ -34,8 +34,7 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + Date: Sat, 12 Dec 2020 15:23:02 +0800 Subject: [PATCH 08/14] Added symlink for include directory --- include/TORoundedButton.h | 1 + 1 file changed, 1 insertion(+) create mode 120000 include/TORoundedButton.h diff --git a/include/TORoundedButton.h b/include/TORoundedButton.h new file mode 120000 index 0000000..a4e16cc --- /dev/null +++ b/include/TORoundedButton.h @@ -0,0 +1 @@ +/Users/TiM/Projects/TORoundedButton/TORoundedButton/TORoundedButton.h \ No newline at end of file From ad0c9fa1c5e3ad9a13765737c8e60089efbfc1d9 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:26:17 +0800 Subject: [PATCH 09/14] Updated package to point to include directory --- Package.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index fb5ae03..b9dedc4 100644 --- a/Package.swift +++ b/Package.swift @@ -22,7 +22,8 @@ let package = Package( "TORoundedButtonExample", "TORoundedButtonExampleTest", "TORoundedButtonFramework" - ] + ], + publicHeadersPath: "../include" ) ] ) From 39f8a5a32ca19cf40b4e2f955cf037b4067e1754 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:27:29 +0800 Subject: [PATCH 10/14] Changed scope of include folder --- Package.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Package.swift b/Package.swift index b9dedc4..d89e476 100644 --- a/Package.swift +++ b/Package.swift @@ -23,7 +23,7 @@ let package = Package( "TORoundedButtonExampleTest", "TORoundedButtonFramework" ], - publicHeadersPath: "../include" + publicHeadersPath: "include" ) ] ) From 5b1d1f706fc0425ef4f1d30d840c425177b09a4b Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:29:58 +0800 Subject: [PATCH 11/14] Explicitly targeted source files --- Package.swift | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Package.swift b/Package.swift index d89e476..e37b544 100644 --- a/Package.swift +++ b/Package.swift @@ -17,11 +17,9 @@ let package = Package( targets: [ .target( name: "TORoundedButton", - path: "TORoundedButton", - exclude: [ - "TORoundedButtonExample", - "TORoundedButtonExampleTest", - "TORoundedButtonFramework" + path: ".", + sources: [ + "TORoundedButton/TORoundedButton.m" ], publicHeadersPath: "include" ) From 11750de2827e75a638230f385f0c5a44c94f5cd6 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:34:40 +0800 Subject: [PATCH 12/14] Updated CHANGELOG --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01bfa4d..b074a1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,17 @@ x.y.z Release Notes (yyyy-MM-dd) ============================================================= +1.1.3 Release Notes (2020-12-12) +============================================================= + +### Added + +* Dark Mode support for iOS 13 and up. ([#34](https://github.com/TimOliver/TORoundedButton/pull/34)) + +### Fixed + +* Refined SwiftPM support to not need to touch the main sources directory. + 1.1.2 Release Notes (2019-07-07) ============================================================= From 61466a93fb8e6b1f2d27df36a5e3e1a4287f8a13 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:38:23 +0800 Subject: [PATCH 13/14] Changed unit test build settings --- .../xcschemes/TORoundedButtonTests.xcscheme | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme b/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme index 0168e75..5bc4ee4 100644 --- a/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme +++ b/TORoundedButtonExample.xcodeproj/xcshareddata/xcschemes/TORoundedButtonTests.xcscheme @@ -5,6 +5,22 @@ + + + + + + - - - - + + + + From b501d0f1dac4b74709ae8527f7a5741ca74661f4 Mon Sep 17 00:00:00 2001 From: Tim Oliver Date: Sat, 12 Dec 2020 15:39:30 +0800 Subject: [PATCH 14/14] Add swiftpm to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c0853c1..fa85ff2 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ fastlane/test_output iOSInjectionProject/ .DS_Store +.swiftpm