Skip to content

enricmacias/EMLResizableNavigationBar

Repository files navigation

EMLResizableNavigationBar

CI Status Version License Platform

Description

Implements a navigation bar behaviour such as the one in Safari app. Allows some kind of behaviour customization.

alt tag

Requirements

  • iOS 7.0
  • ARC

Usage

  1. Inherit your UIViewController class containing the UIScrollView/UITableView with EMLResizableNavigationBarViewController.
  2. Set the UIScrollView/UITableView delegate to self.
  3. You are done!

NOTE: You cannot inherit directly from UITableViewController. To use EMLResizableNavigationBar with a UITableView you need to create a property table view inside a UIViewController and adopt UITableViewDataSource plus UITableViewDelegate.

@interface EMLDemoViewController : EMLResizableNavigationBarViewController <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, weak) IBOutlet UITableView *tableView;

@end

Customization

Add a title:

self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nav_logo"]];

or

self.title = @"ResizableBar";

Hide the bar just half its size:

self.resizableBarResizePercent = 0.5f;

Show the title even when the bar is hidden:

self.resizableBarTitleDisappears = NO;

Installation

CocoaPods

EMLResizableNavigationBar is available through CocoaPods.

pod "EMLResizableNavigationBar"

Manually

Import the following files into your project:

EMLResizableNavigationBar/Pod/Classes folder:

EMLResizableNavigationBarViewController.h
EMLResizableNavigationBarViewController.m

Author

enric.macias.lopez, [email protected]

License

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

About

Objective-C library that hides the UINavigationBar when scrolling a UIScrollView.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •