CocoaPods trunk is moving to be read-only. Read more on the blog, there are 15 months to go.

LDNavigationController 2.0.1

LDNavigationController 2.0.1

TestsTested
LangLanguage Obj-CObjective C
License BSD 3.0
ReleasedLast Release Aug 2016

Maintained by Steven Mattera.



  • By
  • Steven Mattera

Convenient navigation controller subclass for changing the status bar background color in iOS 7+ and setting status bar style and hidden property based on top view controller or root view controller.

Install

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries installation in your projects. To install this library using CocoaPods simply add the following line to your Podfile:

    pod 'LDNavigationController'

Usage

Using Storyboard

Change the class of your UINavigationController to be LDNavigationController. Then customize the status bar through the Attribute Inspector.

Name Type Description
Status Bar Color Color Color for the Status Bar Background.
Status Bar Style Link String Status Bar Style to use. (lightContent or darkContent)
statusBarHidden Boolean Set status bar hidden.
Use Top View Controller Status Bar Style Boolean Use the Top View Controller's status bar style and preferred hidden status.
Use Root View Controller Status Bar Style Boolean Use the Root View Controller's status bar style and preferred hidden status.

For additional help check out the provided example.

Programmatically

Create your navigation controller using LDNavigationController with initWithRootViewController. Then you can customize the statuse bar using the following properties.

Name Description
statusBarColor Color for the Status Bar Background. (iOS 7+ only!)
statusBarStyle Status Bar Style to use. (LDStatusBarStyleLightContent or LDStatusBarStyleDarkContent)
statusBarHidden Set status bar hidden.
useTopViewControllerStatusBarStyle Use the Top View Controller's status bar style and preferred hidden status.
useRootViewControllerStatusBarStyle Use the Root View Controller's status bar style and preferred hidden status.

For additional help check out the provided example.

License

LDNavigationController is published under BSD 3-Clause License

Copyright (c) 2014 Lepidus Development, LLC. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

Neither the name of the Lepidus Development, LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.