Git Product home page Git Product logo

paperfoldmenucontroller's Introduction

PaperFoldMenuController

PaperFoldMenuController is a UITabBarController replacement, but displays the view controllers in a table view on the left side of the screen. This table view is shown/hidden using PaperFold-for-iOS. Selecting from the menu on the left changes the view controller on the right. PaperFoldMenuController uses view controller containment.

Usage

#PaperFoldMenuController

##initWithMenuWidth:numberOfFolds Initialize PaperFoldMenuController

- (id)initWithMenuWidth:(float)menuWidth numberOfFolds:(int)numberOfFolds

####Parameters #####menuWidth This value specifies the width of the table view in the left menu #####numberOfFolds This value specifies the number of folds in the menu table view

##setViewControllers: Sets the root view controllers. Title for each view controllers appears in the menu table view

- (void)setViewControllers:(NSMutableArray *)viewControllers

####Parameters #####viewControllers The array of custom view controllers to display on screen. The title of each view controllers are shown in the menu table view on the left.

##setSelectedIndex: Sets the current root view controller in contentView by index

- (void)setSelectedIndex:(NSUInteger)selectedIndex

####Parameters #####selectedIndex An integer value which is the index of the root view controller in the viewControllers array.

##showMenu:animated: Show or hide the menu table view.

- (void)showMenu:(BOOL)show animated:(BOOL)animated

####Parameters #####show A boolean value to indicate if the menu should be shown or hidden #####animated A boolean value to indicate if the folding/unfolding should be animated #####Discussion This method is automatically called with show=YES and animated=YES when a cell in menu table view is selected.

#PaperFoldMenuControllerDelegate

##paperFoldMenuController:shouldSelectViewController: Ask the delegate whether the specified view controller should be made active

- (BOOL)paperFoldMenuController:(PaperFoldMenuController *)paperFoldMenuController shouldSelectViewController:(UIViewController *)viewController

####Parameters #####paperFoldMenuController The paperfold menu controller containing the viewController. #####viewController The view controller selected in the menu #####Discussion The paperfold menu controller calls this method in response to the user tapping on the left menu. You can use this method to dynamically decide whether the view controller should be made active.

##paperFoldMenuController:didSelectViewController: The paperfold menu controller calls this method in response to the user tapping the left menu, after the viewController is made active.

- (void)paperFoldMenuController:(PaperFoldMenuController *)paperFoldMenuController didSelectViewController:(UIViewController *)viewController

####Parameters #####paperFoldMenuController The paperfold menu controller containing the viewController. #####viewController The view controller selected in the menu

##paperFoldMenuController:shouldFoldMenuToRevealViewController: Ask the delegate if the menu table view should be folded to reveal the selected view controller

- (BOOL)paperFoldMenuController:(PaperFoldMenuController *)paperFoldMenuController shouldFoldMenuToRevealViewController:(UIViewController *)viewController;

####Parameters #####paperFoldMenuController The paperfold menu controller containing the viewController. #####viewController The view controller selected in the menu

Requirements

This project uses ARC. If you are not using ARC in your project, add '-fobjc-arc' as a compiler flag for all the files in this project.

XCode 4.4 is required for auto-synthesis.

iOS 5.0 and above is required because the project uses view controller containment.

Contact

twitter.com/honcheng honcheng.com

paperfoldmenucontroller's People

Contributors

honcheng avatar

Watchers

 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.