Giter Site home page Giter Site logo

mohsinka / bfnavigationbardrawer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sanketfirodiya/bfnavigationbardrawer

0.0 2.0 0.0 6.97 MB

A UIToolbar subclass that can easily be displayed below a UINavigationBar, similarly to the playlist view in the Music app.

License: Other

Ruby 5.88% Objective-C 94.12%

bfnavigationbardrawer's Introduction

BFNavigationBarDrawer

With automatic scroll view adjustment Without scroll view adjustment
Imgur Imgur

Summary

BFNavigationBarDrawer is a UIToolbar subclass that can easily be displayed below a UINavigationBar, similarly to the playlist view in the Music app. You can also assign a scroll view (or table view) to the drawer. The drawer will take care of moving the scroll view's content down and updating its contentInset property, when the drawer is displayed.

Instructions

Create a Podfile, if you don't have one already. Add the following line.

pod 'BFNavigationBarDrawer'

Run the following command.

pod install

Alternatively, you can just drop the BFNavigationBarDrawer.{h,m} files into your project.

Create a drawer instance and assign a scroll view that should be scrolled by the drawer:

drawer = [[BFNavigationBarDrawer alloc] init];
drawer.scrollView = self.tableView;

Add some UIBarButtonItems to it and when you want to display it, call:

[drawer showFromNavigationBar:self.navigationController.navigationBar animated:YES];

To hide it:

[drawer hideAnimated:YES];

Notes

I only tested with iOS 7. It doesn't make a lot of sense to use it with earlier iOS versions, as navigation bars used to be opaque and you could simply resize the scroll view to make room for an additional header bar.

License

New BSD License. For the full license text, see here.

bfnavigationbardrawer's People

Contributors

drummerb avatar brocoo avatar zzz6519003 avatar

Watchers

James Cloos avatar Mohsin Khubaib Ahmed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.