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 bf8355b74..1d67c35d4 100644 Binary files a/Sources/BottomSheet/Media.xcassets/xmark.circle.fill.imageset/xmark.circle.fill@2x.png and b/Sources/BottomSheet/Media.xcassets/xmark.circle.fill.imageset/xmark.circle.fill@2x.png differ