From dbfd88fe4b59cf570c0ebb635704231166ff617a Mon Sep 17 00:00:00 2001 From: Lucas Zischka <63545066+lucaszischka@users.noreply.github.com> Date: Tue, 9 Aug 2022 04:46:37 +0200 Subject: [PATCH] BottomSheet v3.0.1 --- BottomSheetSwiftUI.podspec | 37 +++++++++------- CHANGELOG.md | 4 ++ .../BottomSheetView+HelperViews.swift | 2 + .../Helper/Extensions/BundleExtension.swift | 41 ++++++++++++++++++ .../xmark.circle.fill@2x.png | Bin 1083 -> 1221 bytes 5 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 Sources/BottomSheet/Helper/Extensions/BundleExtension.swift diff --git a/BottomSheetSwiftUI.podspec b/BottomSheetSwiftUI.podspec index 9e585ee7d..8b0fbad7d 100644 --- a/BottomSheetSwiftUI.podspec +++ b/BottomSheetSwiftUI.podspec @@ -1,16 +1,23 @@ -Pod::Spec.new do |s| - s.name = 'BottomSheetSwiftUI' - s.version = '3.0.0' - s.summary = 'A sliding sheet from the bottom of the screen with custom states build with SwiftUI.' - - s.homepage = 'https://github.com/lucaszischka/BottomSheet' - s.license = { :type => 'MIT', :file => 'LICENSE.txt' } - s.author = { 'Lucas Zischka' => 'lucas_zischka@outlook.com' } - s.source = { :git => 'https://github.com/lucaszischka/BottomSheet.git', :tag => s.version.to_s } - - s.ios.deployment_target = '13.0' - s.swift_version = '5.5' - - s.weak_frameworks = 'SwiftUI' - s.source_files = 'Sources/BottomSheet/**/*' +Pod::Spec.new do |spec| + spec.name = 'BottomSheetSwiftUI' + spec.version = '3.0.1' + spec.swift_version = '5.5' + spec.authors = { 'Lucas Zischka' => 'lucas_zischka@outlook.com' } + spec.license = { :type => 'MIT', :file => 'LICENSE.txt' } + spec.homepage = 'https://github.com/lucaszischka/BottomSheet' + spec.readme = 'https://github.com/lucaszischka/BottomSheet/blob/main/README.md' + spec.changelog = 'https://github.com/lucaszischka/BottomSheet/blob/main/CHANGELOG.md' + spec.source = { :git => 'https://github.com/lucaszischka/BottomSheet.git', + :tag => spec.version.to_s } + spec.summary = 'A sliding sheet from the bottom of the screen with custom states build with SwiftUI.' + spec.screenshots = [ 'https://user-images.githubusercontent.com/63545066/132514316-c0d723c6-37fc-4104-b04c-6cf7bbcb0899.gif', + 'https://user-images.githubusercontent.com/63545066/132514347-57c5397b-ec03-4716-8e01-4e693082e844.gif', + 'https://user-images.githubusercontent.com/63545066/132514283-b14b2977-c5d1-4b49-96b1-19995cd5a41f.gif' ] + + spec.ios.deployment_target = '13.0' + spec.osx.deployment_target = '10.15' + + spec.source_files = 'Sources/BottomSheet/**/*.swift' + spec.resource_bundle = { 'BottomSheet_BottomSheet' => 'Sources/BottomSheet/**/*.xcassets' } + end diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d8d49417..0f5c2ab98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ BottomSheet Changelog ================== +#### v3.0.1 +- Fix CocoaPods build #85 +- Fix close button not shown in dark mode #86 + #### v3.0.0 - Recoded the project - Added iPhone landscape support diff --git a/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift b/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift index fe6f40ba5..022e5f23a 100644 --- a/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift +++ b/Sources/BottomSheet/BottomSheetView/BottomSheetView+HelperViews.swift @@ -323,6 +323,8 @@ internal extension BottomSheetView { ) // Design of the close button .resizable() + .renderingMode(.template) + .foregroundColor(.tertiaryLabel) .scaledToFit() .frame( width: 30, diff --git a/Sources/BottomSheet/Helper/Extensions/BundleExtension.swift b/Sources/BottomSheet/Helper/Extensions/BundleExtension.swift new file mode 100644 index 000000000..66472840c --- /dev/null +++ b/Sources/BottomSheet/Helper/Extensions/BundleExtension.swift @@ -0,0 +1,41 @@ +// +// BundleExtension.swift +// +// Created by Lucas Zischka. +// Copyright © 2022 Lucas Zischka. All rights reserved. +// + +#if !SWIFT_PACKAGE +import Foundation + +private class BundleFinder {} + +internal extension Bundle { + /// Returns the resource bundle associated with the current Swift module. + static var module: Bundle = { + let candidates = [ + // Bundle should be present here when the package is linked into an App. + Bundle.main.resourceURL, + + // Bundle should be present here when the package is linked into a framework. + Bundle(for: BundleFinder.self).resourceURL, + + // For command-line tools. + Bundle.main.bundleURL + ] + + + let bundleName = "BottomSheet_BottomSheet" + + for candidate in candidates { + let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle") + if let bundle = bundlePath.flatMap(Bundle.init(url:)) { + return bundle + } + } + + // Return whatever bundle this code is in as a last resort. + return Bundle(for: BundleFinder.self) + }() +} +#endif diff --git a/Sources/BottomSheet/Media.xcassets/xmark.circle.fill.imageset/xmark.circle.fill@2x.png b/Sources/BottomSheet/Media.xcassets/xmark.circle.fill.imageset/xmark.circle.fill@2x.png index bf8355b740ef9a83b049590e9cac9c073e07fcbe..1d67c35d4b3b2ce474cd4eb8c1bf58e0f2a43ba8 100644 GIT binary patch delta 1166 zcmV;91abSj2*n8@iBL{Q4GJ0x0000DNk~Le0000f0000f2nGNE0H|O9_K_h-e<`2? z00aO40096104V?f006)sgkJyv1TRTMK~z`?&6rz=O;H%fopEpSfFvF$QA!4(828ce zpb#|;VGtgK8cObtctDIIFNhkK2h89VHAIc;pm-wF42elZ%56A)|Lv?}pMCb(mvd&E z^VNT^wZ7Z>&suALYoCd9$UtJTe^?j7O27m#77PF#ft$3TYykD(Y9tc*;O69|i+CBG zHpuluw*t%oJ)HIc<5qm?z;Vbv3E*$J1R@E!LcA+MIp}OfX8*WJian5R_DkhU5`x7f z*$?{oCCkA6gP1Cap7M(IBniRQ1g`}JUP;=(cAXp>Ap6ZNS6Y$~j1sWGe=Vq;bdSlq z5~81-`CUmua4U{WoX-DY{D?W0I#)Dh8zCrixge-D7zGZfW0xe75FCziqun6~{Ze>T z*yl}bH-=6aE`uRBDl@Ig0`5s^i@fMO0h_)fQFG0R)2>xe*i*_=u{!zf~|}% zI(>+nhA!&V`;13L2-JBg@^N%CpM%IQr-6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