From 230e3d548fc3e398a638557d1e3cae22b1f0b60b Mon Sep 17 00:00:00 2001 From: Alexandre Podlewski Date: Mon, 4 Mar 2024 15:49:01 +0100 Subject: [PATCH] Remove workaround for iOS 12 The deprecation caused warnings in the pod lint --- .../ExtensibleNavigationBarNavigationController.swift | 5 ----- NavigationBarExtension/Classes/UIToolbar+Appearance.swift | 1 - README.md | 8 -------- 3 files changed, 14 deletions(-) diff --git a/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift b/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift index 09c6a60..ce3f2c3 100644 --- a/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift +++ b/NavigationBarExtension/Classes/ExtensibleNavigationBarNavigationController.swift @@ -7,11 +7,6 @@ public protocol ExtensibleNavigationBarInformationProvider { public class ExtensibleNavigationBarNavigationController: UINavigationController { - // ?!!! (Samuel Gallet) 29/01/2020 isTranslucent property does not work with iOS 12. Use this property - // to set isTranslucent to the custom navigationBar with iOS 12 - @available(iOS, deprecated: 13.0, message: "Use appearance instead of this property") - public static var ad_isTranslucent = true - public private(set) var navigationBarToolbar: UIToolbar? public private(set) var navigationBarExtensionToolbar: UIToolbar? diff --git a/NavigationBarExtension/Classes/UIToolbar+Appearance.swift b/NavigationBarExtension/Classes/UIToolbar+Appearance.swift index 8ef10f4..eeb2938 100644 --- a/NavigationBarExtension/Classes/UIToolbar+Appearance.swift +++ b/NavigationBarExtension/Classes/UIToolbar+Appearance.swift @@ -16,7 +16,6 @@ extension UIToolbar { barTintColor = UINavigationBar .appearance(whenContainedInInstancesOf: [ExtensibleNavigationBarNavigationController.self]) .barTintColor - isTranslucent = ExtensibleNavigationBarNavigationController.ad_isTranslucent let compactNavigationBarAppearance = UINavigationBar .appearance(whenContainedInInstancesOf: [ExtensibleNavigationBarNavigationController.self]) .compactAppearance diff --git a/README.md b/README.md index b812bf8..b1dc918 100644 --- a/README.md +++ b/README.md @@ -86,14 +86,6 @@ let navigationController = ExtensibleNavigationBarNavigationController() navigationController.navigationControllerDelegate = self ``` -There is an issue with iOS 12 where the `isTranslucent` property cannot be retrieved from the -`UINavigationBar.appearance()` method. -So if you need to set your UINavigationBar translucent, you can use this: - -```swift -ExtensibleNavigationBarNavigationController.ad_isTranslucent = true -``` - ## Credits ADNavigationBarExtension is owned and maintained by [Fabernovel](https://fabernovel.com/). You can follow us on Twitter at [@FabernovelApp](https://twitter.com/fabernovelapp).