diff --git a/ADNavigationBarExtension.podspec b/ADNavigationBarExtension.podspec index fff033e..20fad1b 100644 --- a/ADNavigationBarExtension.podspec +++ b/ADNavigationBarExtension.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'ADNavigationBarExtension' - s.version = '1.0.2' + s.version = '1.0.3' s.author = 'Fabernovel Technologies' s.homepage = 'https://technologies.fabernovel.com/' s.summary = 'ADNavigationBarExtension is a UI library written in Swift to show and hide an extension to your UINavigationBar' diff --git a/CHANGELOG.md b/CHANGELOG.md index 2991493..444244c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.0.3] + +### Added +- Set toolbars to fake navigation bar appearance public + ## [1.0.2] ### Fix diff --git a/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift b/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift index a50b4bf..597b5f6 100644 --- a/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift +++ b/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift @@ -13,6 +13,9 @@ public class ExtensibleNavigationBarNavigationController: UINavigationController // swiftlint:disable:next identifier_name public static var ad_isTranslucent: Bool = true + public private(set) var navigationBarToolbar: UIToolbar? + public private(set) var navigationBarExtensionToolbar: UIToolbar? + private lazy var navBarExtensionContainerView: UIView = self.initNavbarExtensionContainerView() private var navBarExtensionContainerBottomConstraint: NSLayoutConstraint? private var navBarExtensionBottomConstraint: NSLayoutConstraint? @@ -88,6 +91,7 @@ public class ExtensibleNavigationBarNavigationController: UINavigationController toolBar.ad_setValuesFromAppearance() container.addSubview(toolBar) toolBar.ad_pinToSuperview() + navigationBarExtensionToolbar = toolbar container.addSubview(view) view.ad_pinToSuperview() container.clipsToBounds = true @@ -137,6 +141,7 @@ public class ExtensibleNavigationBarNavigationController: UINavigationController view.addSubview(toolBar) toolBar.ad_pinToSuperview(edges: [.left, .right]) toolBar.ad_pinToSuperview(edges: .top, insets: UIEdgeInsets(value: -40)) + navigationBarToolbar = toolBar toolbarBottomConstraint = toolBar.bottomAnchor .constraint(equalTo: view.bottomAnchor, constant: -navigationBarAdditionalSize) toolbarBottomConstraint?.isActive = true diff --git a/Podfile.lock b/Podfile.lock index 50ed314..8c4ff58 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - ADNavigationBarExtension (1.0.2): + - ADNavigationBarExtension (1.0.3): - ADUtils (~> 11.0) - ADUtils (11.0.0): - ADUtils/objc (= 11.0.0) @@ -23,7 +23,7 @@ EXTERNAL SOURCES: :path: "./" SPEC CHECKSUMS: - ADNavigationBarExtension: f7f791cbad7ca548cf007f582e3d12907583f109 + ADNavigationBarExtension: 973b264907aa9ad10f33854e0230e84921716e73 ADUtils: 5f5f1ad7a097dcf7104f9c160bc23a30d7943eb8 SwiftLint: 22ccbbe3b8008684be5955693bab135e0ed6a447