Skip to content

Commit

Permalink
Remove workaround for iOS 12
Browse files Browse the repository at this point in the history
The deprecation caused warnings in the pod lint
  • Loading branch information
alexandre-pod committed Mar 4, 2024
1 parent c85989a commit 230e3d5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down
1 change: 0 additions & 1 deletion NavigationBarExtension/Classes/UIToolbar+Appearance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down

0 comments on commit 230e3d5

Please sign in to comment.