Popularity
2.6
Growing
Activity
7.0
-
63
20
10

Description

Use ExtensibleNavigationBarNavigationController to set an extension under your UINavigationBar:

Programming language: Swift
License: MIT License
Tags: Animation     Swift     iOS     UI    
Latest version: v1.0.4

ADNavigationBarExtension alternatives and similar libraries

Based on the "UI" category.
Alternatively, view ADNavigationBarExtension alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of ADNavigationBarExtension or a related project?

Add another 'UI' Library

README

ADNavigationBarExtension is a UI library written in Swift. It allows you to show and hide an extension to your UINavigationBar


Features

Use ExtensibleNavigationBarNavigationController to set an extension under your UINavigationBar:

  • The navigation controller manages the displaying of your navigation bar's extension
  • It is compatible with UIAppearance

See the provided examples for help or feel free to ask directly.



Requirements

ADNavigationBarExtension is written in swift 5.0. Compatible with iOS 10.0+

Installation

ADNavigationBarExtension is available through CocoaPods. To install it, simply add the following line to your Podfile:

Cocoapods

pod 'ADNavigationBarExtension'

Usage

Setup

The main component of the library is the ExtensibleNavigationBarNavigationController. It is basicaly a simple UINavigationController wich manages a supplementary view under the UINavigationBar.

A startup sequence might look like this:

let navigationController = ExtensibleNavigationBarNavigationController()
let navigationBarExtension = MyCustomView()
let navigationBarExtensionHeight = 64
navigationController.setNavigationBarExtensionView(navigationBarExtension, forHeight: navigationBarExtensionHeight)
navigationController.pushViewController(MyViewController(), animated: false)
window.rootViewController = navigationController

Then the ExtensibleNavigationBarNavigationController needs to know when the navigation bar's extension needs to be displayed or to be hidden. You have to use the protocol ExtensibleNavigationBarInformationProvider:

extension MyViewController: ExtensibleNavigationBarInformationProvider {
    var shouldExtendNavigationBar: Bool { return true }
}

Warning

Be aware of ExtensibleNavigationBarNavigationController is using the UINavigationControllerDelegate protocol. So if you also need to use de navigationController's delegate proprerty, you can use this:

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:

ExtensibleNavigationBarNavigationController.ad_isTranslucent = true

Credits

ADNavigationBarExtension is owned and maintained by Fabernovel. You can follow us on Twitter at @FabernovelApp.

License

ADNavigationBarExtension is released under the MIT license. [See LICENSE](LICENSE) for details.


*Note that all licence references and agreements mentioned in the ADNavigationBarExtension README section above are relevant to that project's source code only.