Giter VIP home page Giter VIP logo

ios-slide-menu's Introduction

iOS-Slide-Menu Version

NOTE: If your application supports both landscape and portrait and supports iOS versions below 8, use version 1.4.5

iOS Slide Menu built on top of UINavigationController, with configurable buttons, reveal animations, and tap/swiper gesture recognizers.

alt tag

Version 1.4.5 Notes

Enabling shouldRecognizeSimultaneouslyWithGestureRecognizer was causing issues, if you are seeing unexpected gesture behavior delete the pod and reinstall as that method has been removed

Version 1.4.0 Notes

switchToViewController:withCompletion: method has been deprecated. In order to get the exact same behavior use popToRootAndSwitchToViewController:withCompletion

New features:

  • Allows limiting pan gesture to the sides of the view
  • Allows turning shadow on/off
  • Allows turning slide-out animation on/off when switching between viewControllers
  • Minor bug fixes

Version 1.3.0 Notes

If you are updating from previous versions you'll get compile errors, due to changes to RevealAnimations. Animation configuration is now handled differently, and is separated from the SlideNavigationController. Please see bwlow for more information.

Setup

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
	LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init];
        RightMenuViewController *rightMenu = [[RightMenuViewController alloc] init];
	
	[SlideNavigationController sharedInstance].rightMenu = rightMenu;
	[SlideNavigationController sharedInstance].leftMenu = leftMenu;
	
    // Override point for customization after application launch.
    return YES;
}

Configuring Left and Right menu for different Viewcontrollers

You decide whether to enable or disable slide functionality on each viewController by implementing the following delegate methods of SlideNavigationControllerDelegate. These methods are optional, and if not implemented the menu functionality will be disabled for that particulat viewController.

@interface MyViewController : UIViewController <SlideNavigationControllerDelegate>
@end
@implementation MyViewController

- (BOOL)slideNavigationControllerShouldDisplayLeftMenu
{
        return YES;
}

- (BOOL)slideNavigationControllerShouldDisplayRightMenu
{
	return YES;
}

@end

Public properties

avoidSwitchingToSameClassViewController

Default value is set to YES. If set to YES when switching to a new ViewController if the new viewcontroller is the same type as the current viewcontroller it'll close the menu instead of switching to the viewController.

If set to NO it'll switch to the viewController regardless of types

This can be usefull when you have a menu item, and when the user selects an already selected menu item you don't want to navigate to a new instance of the viewController

enableSwipeGesture

When set to YES user can swipe to open the menu

When set to NO swipe is disabled, and use can only open the menu using the UIBarButtonItem added to the navigationBar ######panGestureSideOffset This property allows you to limit the gesture to the sides of the view. For instance setting this value to 50 means touches are limited to 50 pixels to the right and 50 pixels to the left of the view. This could be useful if you are expecting slide-to-delete functionality on UITableViews.

Default value of panGestureSideOffset is set to 0. Setting panGestureSideOffset to 0 means touches are detected in the whole view if enableSwipeGesture is set to true.

enableShadow

A boolean that allows you to turn shadow on/off. On default shadow is set to true

rightMenu

The viewController of the right menu in the navigationController

leftMenu

The viewController of the left menu in the navigationController

leftBarButtonItem

Default value is null. When this button is set navigationController uses this UIBarButtonItem as the leftItem. this property is intended to be used when a custom UIBarButton is needed (UIBarButtonItem initialized with a custom view)

rightBarButtonItem

Behaves exactly the same as leftbarButtonItem, but it's used as the right button for the menu

portraitSlideOffset

Default value of portraitSlideOffset is 60. This means when the menu is open, the width of the visible portion of the navigation controller is 60 pixels in portrait mode

landscapeSlideOffset

Default value of portraitSlideOffset is 60. This means when the menu is open, the width of the visible portion of the navigation controller is 60 pixels in landscape mode

menuRevealAnimationDuration

Default value of animation duration is .3, this property allows configuring animation duration

menuRevealAnimationOption

Defaults to UIViewAnimationOptionCurveEaseOut, you can change this property to configure animation options

menuRevealAnimator

menuRevealAnimator is used to animate the left/right menu during reveal. The default value is nil, that means no animations occure when opening/closing the menu.

There are existing animation classes that can be used. These animation classes can be configured through init method options.

  • SlideNavigationContorllerAnimatorSlide
  • SlideNavigationContorllerAnimatorFade
  • SlideNavigationContorllerAnimatorScale
  • SlideNavigationContorllerAnimatorScaleAndFade
  • SlideNavigationContorllerAnimatorSlideAndFade
SlideNavigationContorllerAnimatorSlideAndFade *alideAndFadeAnimator = [[SlideNavigationContorllerAnimatorSlideAndFade alloc] initWithMaximumFadeAlpha:.8 fadeColor:[UIColor redColor] andSlideMovement:100];
[SlideNavigationController sharedInstance].menuRevealAnimator = alideAndFadeAnimator;

Public Methods

+ (SlideNavigationController *)sharedInstance;

Returns the singleton instance of SlideNavigationController

- (void)switchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;

This method is deprecated

- (void)popToRootAndSwitchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;

Pops to root view controller and calls the completion.

- (void)popToRootAndSwitchToViewController:(UIViewController *)viewController withSlideOutAnimation:(BOOL)slideOutAnimation andCompletion:(void (^)())completion;

Similar to previous method, but allows turning on/off slide-out-animation during the switch

- (void)popAllAndSwitchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;

Replaces the ViewController stack with a new stack that includes the new ViewController, and calls completion

- (void)popAllAndSwitchToViewController:(UIViewController *)viewController withSlideOutAnimation:(BOOL)slideOutAnimation andCompletion:(void (^)())completion;

Similar to previous method, but allows turning on/off slide-out-animation during the switch

- (void)openMenu:(Menu)menu withCompletion:(void (^)())completion;

Opens a given menu and calls the completion block oppon animation completion

- (void)closeMenuWithCompletion:(void (^)())completion;

Closes the menu and calls the completion block oppon animation completion

- (void)toggleLeftMenu;

Toggles the left menu open or close depending on the existing state. This was made public in order to pass the selector to a custom UIBarButtonItem (ex: UIBarButtonItem with a button as a custom view)

UIButton *button  = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
[button setImage:[UIImage imageNamed:@"menu-button"] forState:UIControlStateNormal];
[button addTarget:[SlideNavigationController sharedInstance] action:@selector(toggleRightMenu) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
[SlideNavigationController sharedInstance].rightBarButtonItem = rightBarButtonItem;
- (void)bounceMenu:(Menu)menu withCompletion:(void (^)())completion;

Bounces either right or left menu, and calls the completion block oppon animation completion

- (void)toggleRightMenu;

Works exactly the same as toggleLeftMenu, but used to toggle left menu

- (BOOL)isMenuOpen;

Returns a boolean stating whether the menu is open or not

Custom Animations

SlideNavigationController allows custom reveal animations. In order to add custom animations create a new class implementing SlideNavigationContorllerAnimator protocol. For more information take a look at the existing animation classes.

- (void)prepareMenuForAnimation:(Menu)menu;

This method gets called right before the menu is about to reveal

- (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress;

This method gets called as the menu reveal occurs, and passes the progress to be used for animations(progress is between 0 and 1)

- (void)clear;

This method gets called if for any resons the instance of animator is being changed. For instance, the animator is changed from SlideNavigationContorllerAnimatorFade to SlideNavigationContorllerAnimatorSlide. In this method you should cleanup the state of the menu if neede. For instance if you added a view to the menu for reveal animation, you should remove it when clear gets called. Public Methods

Notifications

SlideNavigationControllerDidOpen

This notification is posted EVERY time the menu goes inot a complete open state Userinfo contains a value with key "menu", which could have 2 values "left" and "right"

SlideNavigationControllerDidClose

This notification is posted EVERY time the menu goes inot a complete close state Userinfo contains a value with key "menu", which could have 2 values "left" and "right"

SlideNavigationControllerDidReveal

This notification is posted once everytim a menu reveals Userinfo contains a value with key "menu", which could have 2 values "left" and "right"

ios-slide-menu's People

Contributors

aryaxt avatar mark2b avatar nullproduction avatar pnicholls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ios-slide-menu's Issues

Incorrect slide behaviour when using side menu from a detail view controller

I discovered this bug while trying to swipe the right-hand side menu away whilst in a view controller that was not the root one (e.g. a detail view).

If you go to a detail view controller that also has the side menu enabled, it is possible to slide back to the root view controller without dismissing the side menu. That might be difficult to explain, so I've created a video here to show how to reproduce the problem: https://drive.google.com/file/d/0B7hk_IdN2v-QNG5jelBoSzJxc1k/edit?usp=sharing

Steps to reproduce:

  1. Open the demo project, change slideNavigationControllerShouldDisplayRightMenu to return YES in ProfileDetaiViewController.
  2. Navigate to the profile menu item, and then push the detail view controller onto the navigation stack.
  3. Open the right hand side menu, then in the gap between the menu and the left edge of the screen, tap-drag the screen to the right. I coloured the detail view blue to make this a bit clearer in the video.
  4. When you dismiss the side menu, you will no longer be on the detail controller but instead the root profile view controller.

Expectations:

It should not be possible to dismiss the detail view controller in this way.

How to use on non-storyboard project?

I tried to setup according to instructions from readme, but the slide menu doesn't appear.

MenuViewController *menu = [[MenuViewController alloc] init];
[SlideNavigationController sharedInstance].leftMenu = menu;

Am I missing something?

SplitView for ipad

Hello. Whether it is possible to do for ipad SlideMenu displayed as UISplitViewController?

alt text

Close the menu faster after selection

Hi, Me again. So Everything is working fine so far. Loving your control a lot by the way. One thing though. I want the slide menu to close a little bit faster after a selection has been made in the revealed menu. Is there a way to achieve this?

Thanks!

Right menu without the BarButtonItem

Is it possible to make it slide from right menu WITHOUT needing bar button items everytime? Not sure if i'm the only one who has this use case, I can implement it on my side.

Reset left navigation bar

I want to have a certain class as the left navigation bar before the user logs in and another class after logging in.

Right now its not allowing me to do so by just setting the leftMenu variable, is there a specific way this will work?

Open Menu in pushed ViewController

Is it possible to open menus, with sliding VC content or NavBar, in a view controller that has being pushed ?? I don't want to place a Menu button (///) in order to be able to open menus, I want the user to be able to open the menu no matter where it is.. or how deep in the navigation stack it is.

Singleton instance already exists.

I have a logout button, when i press this button the user should log in again, when the user log in correctly this message appears
"Singleton instance already exists. You can only instantiate one instance of SlideNavigationController. This could cause major issues".

I know why that's happen but i don't know how to remove the slideNavigationCntroller instance when the user press Logout

Hope you can help me

Deep Linking?

When switching between menu items, your current position is lost and you're routed back to the root screen for that menu section.

ex: i'm pushing some VC from menuItem1 and switch to menuItem2 after that, when i'm returning to menuItem1 my VC reloads (pushed VC disappear).

adding view controllers helper classes

Nice work, looking to use this in a project which is already build in JQM Im new to IOS and have been trying to add a new view controller to the side menu control but it keeps crashing I am assigning a new class to the helper classes and inheriting form sidemenucontoller its probably because I'm a newbie can you help.

BTW this is not an issue as such more of help with adding new controllers to the exiting project.

greg

Switch to same view controller

Hi Aryan!

I have a problem when i want switch to same view controller. If i want reuse a view controller with some little change within it exp: In view controller, have a variable name listType and each i init view controller, just change that variable. In left menu, i switch to that view, but slide menu just close menu. I think you need add a bool property, it can enable/disable switch to same view controller.

Thanks

Support switching of view controllers by setViewControllers method

Currently, the switchToViewController method swaps the current view controller by popping to the root view controller then pushing another view controller on top of the stack. However, this causes the viewControllers array to contain two view controllers, which causes the displayed view controller to show a Back button in the NavigationBar. This is undesirable because the slide menu should be swapping view controllers between each selection, or clearing the viewControllers array before pushing a new view controller in.

Newbie alert! Black below the Top view controller

So, I've gotten the slide menu configured as well as I can, and in truth, when I run my project, sliding from either side anchor's the top view controller to the side, except there's only a black screen below, not a tableView as I would like to think.

I have hooked up the LeftMenuViewController and RightMenuViewController to table views in the storyboard and set the correct code handlers for each ViewController. I can't seem to figure out why there's no tableView when I slide either right or left, only black.

Please help me. Thanks in advance.

Black menu

Hello,

I don't know why, but my left menu doesn't appear, i have only a black background color.

Somebody know why ?

Thank you for your answer

App Crash when menu open

Hi, thank you for your excellent code, i have a problem with the implementation, i think that is like a bug with the segue, if i touch de menu button while the transition of the segue is happenning the app crash, any clue?

Swiping to the other menu visual bug

When I swipe from the left menu to the right menu, I will sometimes get this bug.

img_0012

In this picture, it is actually showing part of my left menu and it is not showing my right menu at all.

Is there a way to pass parameters to Loaded view controller?

i tried this.

OMVoidReadingsViewController *vError = (OMVoidReadingsViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"voidreadings"];

vError.txt1.text = @"FOR USER NO.2";
                vError.txt2.text = @"PLEASE SWITCH TO USER NO.2. TAKE A READING AND THEN SYNC AGAIN";
                vError.image.image = [UIImage imageNamed:@"device_user_22x.png"];

[[SlideNavigationController sharedInstance] switchToViewController:viewController0 withCompletion:nil];

Slide Menu overlapping

Hi, is there the possibility to have a slide menu that overlaps the main view and not "push" it away? Thanks!

Apply navigation chain , After login process

What I am doing is that I put SlidernavigationController in the middle of scenes. So SlidernavigationController is not initial rootViewcontroller. Then menuViewcontroller is black.
What should I change to apply SlidernavigationController after a couple of login process.
The reason why I don't want SlidernavigationController to be initialRootView is my segue style is modal in login process.
Thanks

Slide gestures doesn't work

pic
When i use structure like in screenshot slide gestures works wrong. Sidemenu doesn't appears though gestures recognizes.

Possible to get a side menu to appear on the opposite side

Sometimes it is possible (quite easily) to get the wrong menu to appear on the opposite side with this component. I have provided a video which demonstrates how to reproduce, with the following steps:

  1. Select the main view with a tap/click and hold.
  2. Begin to slide one way, and then slide back the other way quickly.
  3. Release the tap - the wrong menu is probably visible on the opposite site.

I have also noticed this appearing through normal app usage, however this seems to be the most consistent way to reproduce the bug.

Here's the video: https://drive.google.com/file/d/0B7hk_IdN2v-QM3U5SlVwZ3ZvQ1k/edit?usp=sharing

Crash On Tab Bar Appication

Hello,
I am creating tab bar application in which i use slider but my app crash when i click menu button.please give me suggestion how to fix that issue.

Thanks and Regards
Ankush

Adding a UIBarButtonItem with a customView doesn't work.

If you pass a UIButton wrapped in a UIBarButtonItem as a 'custom view' of the slide menu, clicking the button doesn't work, because the action and target are not set to the button, but they are set to the UIBarButtonItem

UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:someButton];
[[SlideMenu sharedInstance].rightBarButtonItem = item;

How to remove bounce effect on switchToViewController

Is there anyway to remove the bounce effect upon switchToViewController? I just want my viewController to appear on switchToViewController like when closing the slide navigation menu when tapping the leftBarButton (no bounce).

Use Key frame animation

Hi;
Its really a great work. Thumbs up for you.
Only one recommendation use key frame animation in bounce function rather to have nested loops. That will make your code much readable.
Regards

Addition Features

Your work is really cool!

I thing it more perfect if you can add some methods:
a. Make public 2 method:

  • (void)leftMenuSelected:(id)sender;
  • (void)righttMenuSelected:(id)sender;
    b. Add option disable/enable swipe gesture
    c. More effect

Thanks so much!

Black View in Menu

When I open the leftMenu, why is this View Black?

UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@"Profe5" bundle:nil];
LeftTableViewController * menu = (LeftTableViewController *)[storyboard instantiateViewControllerWithIdentifier:@"LeftTableViewController"];

[SlideNavigationController sharedInstance].leftMenu = menu;

also I already have this Code

- (BOOL)slideNavigationControllerShouldDisplayLeftMenu {
    return YES; 
}

Somebody know why ?

Thank you for your answer

Rotation bug

Start your test application in vertical mode.
Login.
View rught menu - it's ok!
Then rotate device!
Look at the right menu - upper menu item is under the notification bar!

Wrong Switch/visibility between left and rigth panel and gestures always gets detected when on child controllers

Issue 1:

  1. sometimes the right side panel is visible in left and left is visible in right.

steps to reproduce:

a) Hold the screen from any place nearly 60% or greater width.
b) Slide with screen until half or more but do not hold off the screen.
c) With some speed slide to opposite direction.

Outcome:

Menu in right side will appear in left side and vice-versa, and this issue occurs all the times when following the above steps.

Issue 2:

Using the same steps sometimes the blank screen is visible, but this issue is rare but occurs.

Issue 3:

When pushed to another child view controller then on each child controller the pan gesture of parent screen is always detected and the processes running on side panels underneath that are currently not visible nor the options/buttons to show left/right panel is present but the event of pan gesture is detected on child and the event on left/right panel that should occur only when visible is occurred underneath the child controller.

img_0154
img_0155
img_0156

How can i update side menu elements?

Hello i tried to refres uitableviewcell and other labels in sidemenucontroller but viewdidload or viewwillappear only was called at the first time that menu is opened

View frozen when popToRootController

I'm in the leftTableViewController from the SlideNavigationController, When I Select an other Controller, the SlideNavigarion works perfectly, but in the selected Controller y select popToRootController, it works but when i want to select a row the view is frozen

captura de pantalla 2014-06-05 a la s 1 41 45 pm

here's my code :

  • (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Garulink"
    bundle: nil];
    if (indexPath.row==0 && indexPath.section==1) {
    NSLog(@"0");
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    UITableViewController *vc ;
    vc = [mainStoryboard instantiateViewControllerWithIdentifier: @"TodayEventTableViewController"];
    [[SlideNavigationController sharedInstance] popToRootAndSwitchToViewController:vc
    withSlideOutAnimation:self.slideOutAnimationEnabled
    andCompletion:nil];
    }else if (indexPath.row==1) {
    NSLog(@"1");

    }else if (indexPath.row==2) {
    NSLog(@"2");
    [[SlideNavigationController sharedInstance] popToRootViewControllerAnimated:YES];

    }else if (indexPath.row==3) {
    NSLog(@"3");
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    UITableViewController *vc ;
    vc = [mainStoryboard instantiateViewControllerWithIdentifier: @"PopularEventTableViewController"];
    [[SlideNavigationController sharedInstance] popToRootAndSwitchToViewController:vc
    withSlideOutAnimation:self.slideOutAnimationEnabled
    andCompletion:nil];

    }else if (indexPath.row ==4) {
    [tableView deselectRowAtIndexPath:indexPath animated:YES];

    UITableViewController *vc ;
    vc = [mainStoryboard instantiateViewControllerWithIdentifier: @"Events"];
    
    [[SlideNavigationController sharedInstance] popToRootAndSwitchToViewController:vc
                                                             withSlideOutAnimation:self.slideOutAnimationEnabled
                                                                     andCompletion:nil];
    

    }else if (indexPath.row ==5) {

    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    UIViewController *vc ;
    vc = [mainStoryboard instantiateViewControllerWithIdentifier: @"SuperInit"];
    vc.navigationItem.hidesBackButton= YES;
    [[SlideNavigationController sharedInstance] popToRootAndSwitchToViewController:vc
                                                             withSlideOutAnimation:self.slideOutAnimationEnabled
                                                                     andCompletion:nil];
    
    [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"firstTime"];
    [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"cate"];
    [[NSUserDefaults standardUserDefaults] setObject:nil forKey:@"emailAndPass"];
    [[NSUserDefaults standardUserDefaults] synchronize];
    

    }

captura de pantalla 2014-06-05 a la s 1 39 55 pm

maybe you can help me
thanks

Navigation bar title and buttons not shown

Hey,
The "sliding navigation controller" in my app is not the initial view controller in the app. I set it up at the first time it appears, and it works fine.
Only problem is, I can't seem to get the navigation bar's title and buttons to show. The navigation bar keeps appearing empty.

I run this code in the "viewDidLoad" method of the first navigation controller that is embedded in the "sliding navigation controller":

// setup side menu
ICContentMenuViewController *contentMenu = [self.storyboard instantiateViewControllerWithIdentifier:@"menuController"];
[SlideNavigationController sharedInstance].leftMenu = contentMenu;
self.navigationController.view.backgroundColor = [UIColor whiteColor];
[SlideNavigationController sharedInstance].rightBarButtonItem = leftBarButtonItem;
self.navigationItem.title = @"Browse";

// Creating a custom bar button for left menu
UIButton *button  = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
[button setImage:[UIImage imageNamed:@"MenuIcon"] forState:UIControlStateNormal];
[button addTarget:[SlideNavigationController sharedInstance] action:@selector(toggleLeftMenu) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];

The menu gets set and loads fine, and the background color gets set, but no title and no button.
I also tried setting the title from the storyboard, but no luck... any idea what I'm missing here?

How to use SlideMenu with tabbar application?

I have to implement slide-menu with tabbar. Please guide me how could i do that?

Below is my code

//Initializinting Tabbar
tabBarControler = [[UITabBarController alloc]init];

    [[UITabBar appearance] setTintColor:[UIColor whiteColor]];
    [[UITabBar appearance] setBarTintColor:[UIColor blackColor]];


    COHomeViewController *coHomeViewController = [[COHomeViewController alloc] initWithNibName:@"COHomeViewController" bundle:nil];

    UINavigationController *coHomeNavController = [[SlideNavigationController alloc] initWithRootViewController:coHomeViewController];
    coHomeNavController.navigationBarHidden = NO;
    coHomeNavController.navigationBar.translucent = NO;
    coHomeNavController.navigationBar.barTintColor = [UIColor blueHColor];
    coHomeNavController.navigationBar.tintColor = [UIColor whiteColor];
    coHomeNavController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};


    COCalendarViewController *coCalenderViewController = [[COCalendarViewController alloc] initWithNibName:@"COCalendarViewController" bundle:nil];
    UINavigationController *coCalenderNavController = [[UINavigationController alloc] initWithRootViewController:coCalenderViewController];
    coCalenderNavController.navigationBarHidden = NO;
    coCalenderNavController.navigationBar.translucent = NO;
    coCalenderNavController.navigationBar.barTintColor = [UIColor blueHColor];
    coCalenderNavController.navigationBar.tintColor = [UIColor whiteColor];
    coCalenderNavController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};

    COChatViewController *coChatViewController = [[COChatViewController alloc] initWithNibName:@"COChatViewController" bundle:nil];
    UINavigationController *coChatNavController = [[UINavigationController alloc] initWithRootViewController:coChatViewController];
    coChatNavController.navigationBarHidden = NO;
    coChatNavController.navigationBar.translucent = NO;
    coChatNavController.navigationBar.barTintColor = [UIColor blueHColor];
    coChatNavController.navigationBar.tintColor = [UIColor whiteColor];
    coChatNavController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};

    COCareLogViewController *coCarelogViewController = [[COCareLogViewController alloc] initWithNibName:@"COCareLogViewController" bundle:nil];
    UINavigationController *coCarelogNavController = [[UINavigationController alloc] initWithRootViewController:coCarelogViewController];
    coCarelogNavController.navigationBarHidden = NO;
    coCarelogNavController.navigationBar.translucent = NO;
    coCarelogNavController.navigationBar.barTintColor = [UIColor blueHColor];
    coCarelogNavController.navigationBar.tintColor = [UIColor whiteColor];
    coCarelogNavController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};

    COCareTeamViewController *coCareTeamViewController = [[COCareTeamViewController alloc] initWithNibName:@"COCareTeamViewController" bundle:nil];
    UINavigationController *coCareTeamNavController = [[UINavigationController alloc] initWithRootViewController:coCareTeamViewController];
    coCareTeamNavController.navigationBarHidden = NO;
    coCareTeamNavController.navigationBar.translucent = NO;
    coCareTeamNavController.navigationBar.barTintColor = [UIColor blueHColor];
    coCareTeamNavController.navigationBar.tintColor = [UIColor whiteColor];
    coCareTeamNavController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};



    self.tabBarControler.viewControllers = [NSArray arrayWithObjects:coHomeNavController,coCalenderNavController,coChatNavController,coCarelogNavController,coCareTeamNavController, nil];
    self.tabbarBackground = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,320.0,50)];
    [self.tabbarBackground setImage:[UIImage imageNamed:@"home_selectedCO.png"]];
    [tabBarControler.tabBar addSubview:self.tabbarBackground];
    tabBarControler.delegate = self;


    COSlideViewController *coSlideViewController = [[COSlideViewController alloc] initWithNibName:@"COSlideViewController" bundle:nil];


    [SlideNavigationController sharedInstance].leftMenu = coSlideViewController;

    /// set animation type
    id <SlideNavigationContorllerAnimator> revealAnimator = [[SlideNavigationContorllerAnimatorScaleAndFade alloc] initWithMaximumFadeAlpha:.6 fadeColor:[UIColor blackColor] andMinimumScale:.7];
    [SlideNavigationController sharedInstance].menuRevealAnimator = revealAnimator;

    self.window.rootViewController = tabBarControler;

    [self.window makeKeyAndVisible];

Currently, I am getting following result. Only First tabbar item is responding to left swipe. But I want Nav Drawer till end. While other tabs are not swipable.

Please guide me.

ios simulator screen shot 22-jul-2014 3 23 15 pm
ios simulator screen shot 22-jul-2014 3 23 23 pm
ios simulator screen shot 22-jul-2014 3 28 47 pm

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.