Skip to content

RMPScrollingMenuBarController has a scrollable menu bar, and multiple view controllers.

License

Notifications You must be signed in to change notification settings

yshrkt/RMPScrollingMenuBarController

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RMPScrollingMenuBarController

Version License Platform

Overview

RMPScrollingMenuBarController has a scrollable menu bar, and multiple view controllers.

You can switch view controllers, which is managed like a UITabBarController, by swiping a screen or scrolling the menu.

Screen shot

Installation

RMPScrollingMenuBarController is available through CocoaPods.
To install it, simply add the following line to your Podfile:

pod "RMPScrollingMenuBarController"

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Setup is as below:

RMPScrollingMenuBarController* menuController = [[RMPScrollingMenuBarController alloc] init];
menuController.delegate = self;

NSArray* viewControllers = @[vc1, vc2, vc3, vc4, vc5];
[menuController setViewControllers:viewControllers];

UINavigationController* naviController;
naviController = [[UINavigationController alloc] initWithRootViewController:menuController];

Delegate methods are as below:

- (RMPScrollingMenuBarItem*)menuBarController:(RMPScrollingMenuBarController *)menuBarController
                           menuBarItemAtIndex:(NSInteger)index
{
    RMPScrollingMenuBarItem* item = [[RMPScrollingMenuBarItem alloc] init];
    item.title = [NSString stringWithFormat:@"Title %02ld", (long)(index+1)];
    
    return item;
}

- (void)menuBarController:(RMPScrollingMenuBarController *)menuBarController
 willSelectViewController:(UIViewController *)viewController
{
    NSLog(@"will select %@", viewController);
}

- (void)menuBarController:(RMPScrollingMenuBarController *)menuBarController
  didSelectViewController:(UIViewController *)viewController
{
    NSLog(@"did select %@", viewController);
}

- (void)menuBarController:(RMPScrollingMenuBarController *)menuBarController
  didCancelViewController:(UIViewController *)viewController
{
    NSLog(@"did cancel %@", viewController);
}

Requirements

  • iOS 7.0 or higher

Contribution

If you have feature requests or bug reports, feel free to help out by sending pull requests or by creating new issues.

Author

Yoshihiro Kato, yoshihiro@sputnik-apps.com
Recruit Marketing Partners Co.,Ltd. recruit_mp_oss@ml.cocorou.jp

License

RMPScrollingMenuBarController is available under the MIT license.

About

RMPScrollingMenuBarController has a scrollable menu bar, and multiple view controllers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 97.8%
  • Ruby 2.2%