Giter VIP home page Giter VIP logo

ios-slide-menu's Issues

SplitView for ipad

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

alt text

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?

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?

Slide gestures doesn't work

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

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!

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

Slide Menu overlapping

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

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

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

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

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;

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

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

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?

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.

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.

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?

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

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).

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.

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.

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];

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

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

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

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

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!

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!

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.

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).

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

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.