Latest 0.5.1.1
Homepage https://github.com/interactiveservices/NavigationBarAppearance
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Stop seraching stackoverflow and just do it in a few lines of code with declarative manner

Features

configure NavigationBar:


let navigationBar = UINavigationBar.appearance()
- image (globaly and in currentVC)
navigationBar.apply(attribute:.backgroundImage(UIImage(named:"NavigationBar")))

- solidColor (globaly and in currentVC)
navigationBar.apply(attribute:.plainColor(.blue)))

- titleAttributes (globaly and in currentVC)
navigationBar.apply(attributes:[
    NavigationBarAttribute.titleColor(.red),
    NavigationBarAttribute.titleFont(.boldSystemFont(ofSize: 20))
])
  • remove or set back shadow in on line of code
self.naviagtionController?.navigationBar.apply(attribute:.showShadow(false))
  • customise backbutton image and title for NavigationController subclass named IASNavigationController
    subclass IASNavigationController or create it in code. Then before show it
    set it navigationBarAttributes property to anything you want
IASNavigationController(rootViewController: UIViewController(), 
                        attributes: [.backButton("GoBack",UIImage(named:"BackButton"))])

Configure UIBarButtonItem:

  • barbuttonsTitleAttributes (globaly and in currentVC)
    and ect
let barButtonItem = UIBarButtonItem.appearance(whenContainedInInstancesOf: [UINavigationBar.self])
barButtonItem.apply(attributes: [.barButtonTitleFont(.systemFont(ofSize: 10)),
                                 .barButtonTitleColor(.gree])

Requirements

  • iOS 7

Installation

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

pod "NavigationBarAppearance"

Author

[email protected], [email protected]

License

NavigationBarAppearance is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "NavigationBarAppearance",
    "version": "0.5.1.1",
    "summary": "Easy way to customize navigationbar and barbuttonitem appearance of your viewcontroller or entire applcation in declarative manner",
    "description": "Stop seraching stackoverflow and just do it in a few lines of code with declarative mannernYou can easily configure NavigationBar:n- image (globaly and in currentVC)n- solidColor (globaly and in currentVC)n- titleAttributes (globaly and in currentVC)n- customise backbutton image and titlen- barbuttonsTitleAttributes (globaly and in currentVC)n- remove or set back shadow in on line of code",
    "homepage": "https://github.com/interactiveservices/NavigationBarAppearance",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/interactiveservices/NavigationBarAppearance.git",
        "tag": "0.5.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "NavigationBarAppearance/Classes/**/*",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This