Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 114 lines (75 sloc) 4.191 kb
d45b0f0 @honcheng Initial commit
authored
1 PaperFoldMenuController
2 =======================
3
a25be9b @honcheng - updated README with screenshots and instructions
authored
4 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](https://github.com/honcheng/PaperFold-for-iOS). Selecting from the menu on the left changes the view controller on the right. PaperFoldMenuController uses view controller containment.
5
6
7 <img src="https://github.com/honcheng/PaperFoldMenuController/raw/master/Screenshots/demo.png"/>
8
9
d580ba6 @honcheng - added a GIF demo
authored
10 <img src="https://github.com/honcheng/PaperFoldMenuController/raw/master/Screenshots/demo.gif"/>
11
a25be9b @honcheng - updated README with screenshots and instructions
authored
12 Usage
13 -----
14
15 #PaperFoldMenuController
16
f14c253 @honcheng - show how menu table view can be styled in demo app
authored
17 ##initWithMenuWidth:numberOfFolds
18 Initialize PaperFoldMenuController
a25be9b @honcheng - updated README with screenshots and instructions
authored
19
f14c253 @honcheng - show how menu table view can be styled in demo app
authored
20 - (id)initWithMenuWidth:(float)menuWidth numberOfFolds:(int)numberOfFolds
a25be9b @honcheng - updated README with screenshots and instructions
authored
21
22 ####Parameters
23 #####menuWidth
24 This value specifies the width of the table view in the left menu
f14c253 @honcheng - show how menu table view can be styled in demo app
authored
25 #####numberOfFolds
26 This value specifies the number of folds in the menu table view
a25be9b @honcheng - updated README with screenshots and instructions
authored
27
28 ##setViewControllers:
29 Sets the root view controllers. Title for each view controllers appears in the menu table view
30
31 - (void)setViewControllers:(NSMutableArray *)viewControllers
32
33 ####Parameters
34 #####viewControllers
35 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.
36
37 ##setSelectedIndex:
38 Sets the current root view controller in contentView by index
39
40 - (void)setSelectedIndex:(NSUInteger)selectedIndex
41
42 ####Parameters
43 #####selectedIndex
44 An integer value which is the index of the root view controller in the viewControllers array.
45
f14c253 @honcheng - show how menu table view can be styled in demo app
authored
46 ##showMenu:animated:
47 Show or hide the menu table view.
48
49 - (void)showMenu:(BOOL)show animated:(BOOL)animated
50
51 ####Parameters
52 #####show
53 A boolean value to indicate if the menu should be shown or hidden
54 #####animated
55 A boolean value to indicate if the folding/unfolding should be animated
56 #####Discussion
57 This method is automatically called with show=YES and animated=YES when a cell in menu table view is selected.
a25be9b @honcheng - updated README with screenshots and instructions
authored
58
59 #PaperFoldMenuControllerDelegate
60
61 ##paperFoldMenuController:shouldSelectViewController:
62 Ask the delegate whether the specified view controller should be made active
63
64 - (BOOL)paperFoldMenuController:(PaperFoldMenuController *)paperFoldMenuController shouldSelectViewController:(UIViewController *)viewController
65
66 ####Parameters
67 #####paperFoldMenuController
68 The paperfold menu controller containing the viewController.
69 #####viewController
70 The view controller selected in the menu
71 #####Discussion
72 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.
73
74 ##paperFoldMenuController:didSelectViewController:
f14c253 @honcheng - show how menu table view can be styled in demo app
authored
75 The paperfold menu controller calls this method in response to the user tapping the left menu, after the viewController is made active.
a25be9b @honcheng - updated README with screenshots and instructions
authored
76
77 - (void)paperFoldMenuController:(PaperFoldMenuController *)paperFoldMenuController didSelectViewController:(UIViewController *)viewController
78
79 ####Parameters
80 #####paperFoldMenuController
81 The paperfold menu controller containing the viewController.
82 #####viewController
83 The view controller selected in the menu
84
f14c253 @honcheng - show how menu table view can be styled in demo app
authored
85
86 ##paperFoldMenuController:shouldFoldMenuToRevealViewController:
87 Ask the delegate if the menu table view should be folded to reveal the selected view controller
88
89 - (BOOL)paperFoldMenuController:(PaperFoldMenuController *)paperFoldMenuController shouldFoldMenuToRevealViewController:(UIViewController *)viewController;
90
91 ####Parameters
92 #####paperFoldMenuController
93 The paperfold menu controller containing the viewController.
94 #####viewController
95 The view controller selected in the menu
96
97
a25be9b @honcheng - updated README with screenshots and instructions
authored
98 Requirements
99 ---
100
101 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.
8898c15 @honcheng - added license file
authored
102
a25be9b @honcheng - updated README with screenshots and instructions
authored
103 XCode 4.4 is required for auto-synthesis.
8898c15 @honcheng - added license file
authored
104
a25be9b @honcheng - updated README with screenshots and instructions
authored
105 iOS 5.0 and above is required because the project uses view controller containment.
106
107 Contact
108 ------
109
110 [twitter.com/honcheng](http://twitter.com/honcheng)
111 [honcheng.com](http://honcheng.com)
8898c15 @honcheng - added license file
authored
112
113 ![](http://www.cocoacontrols.com/analytics/honcheng/paperfoldmenucontroller.png)
Something went wrong with that request. Please try again.