GithubHelp home page GithubHelp logo

arturdev / amslidemenu2 Goto Github PK

View Code? Open in Web Editor NEW
1.2K 1.2K 195.0 5.09 MB

Sliding Menu for iOS (Left and Right menus). Multiple storyboards and XIBs support.

License: MIT License

Ruby 1.78% Swift 98.22%

amslidemenu2's People

Contributors

arturdev avatar jlindenbaum avatar l0gg3r avatar luongvm avatar matghazaryan avatar nareksafaryan avatar ov1d1u 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

amslidemenu2's Issues

Missing indexPath entries in switch leads to crash

I was playing around with release 1.5.2, and followed the video to hook things up. I created three static cells, but in my segueIdentifierForIndexPathInLeftMenu I only had case 2 returning a string, the others just left the identifier nil.

This leads to a crash in my MainViewController with a message telling me I do not have a leftMenu segue.

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<MainViewController: 0x8c95e80>) has no segue with identifier 'rightMenu''

Took me a while to figure out that only if I implement all cases in segueIdentifierForIndexPathInLeftMenu does it work.

I realize this is a bit of an edge case, but it would be nice to handle this a bit more gracefully than a full-on crash of the app.

button for right slidemenu

I have tried adding a custom button in code to the right slide out menu

(void)configureRightMenuButton:(UIButton *)button
{

CGRect frame = button.frame;
frame = CGRectMake(0, 0, 20, 20);
button.frame = frame;
button.backgroundColor = [UIColor clearColor];
[button setImage:[UIImage imageNamed:@"menu_knob"] forState:UIControlStateNormal];

}

It worked perfectly. the only thing that bothers me is that it appears on every view..
what do I do to make it appear only in the first screen, when I open up the app?

and also if I add a Bar Button Item in the storyboard, it doesn't appear when I start the app.
Is there any code I can erase to make the button that I added in storyboard to appear?

Thank you

unfix status bar with view???

How to unfix status bar with view so that the navigation bar can fill the status bar properly and not have an offset of the 20 px that came from the view we fixed the status bar with?
Fixing the status bar with a view of 0 in the specific viewcontroller and the fixing it again with a view of 20 px, double's it up as in another view if 20px with within the navigation bar, so that does not help.

Autolayout

Hello. You've done great work, I saw you demo video on YT. But I have one question: In the demo video you turned off autolayout for your storyboard, does this mean AMSlideMenu is not compatible with auto layout? Thanks in advance.

Remove Slide Menu in subview

I have the following use case:

AVC has a slide menu
AVC pushes a new VC BVC
the panning gesture on BVC still shows the slide menu for AVC. (It shouldn't for my use case)
Note: I'm using Storyboard.

How do I remove it for BVC?

Thanks

TableView Cell style

menu
Hello again!
Sorry, if my question is not quite correct, but I spend much time to solve this problem - Now, when I select menu item, it's become gray, but how I can change it's color, or, for example, set alpha for it? I try to find solve in the internet, but all what I found there didn't help me.

Passing data from left menu to the same destination

Hey,

I am trying to achieve something different with amslidemenu, I want to use the left menu as a list of strings but when the user selects an item from the menu to go only to one controller which changes values depending on the selection of the user.

My menu table view has only 1 segue and 1 destination navigation controller, something like this:

category -> segue -> destination

I don't want each item in the table view to go to a different controller, I want all of them to go to 1 single controller, passing an string when selected to the controller.

I have tried playing with didselectitem and prepareforsegue but I get an error that there is no segue with rightMenu in storyboard.

Best regards!

Left Menu push viewcontrolelr

Hi,

I would like to know if it is possible to push a viewcontroller (uitableview with a searchbar) when a user clicks on a left menu item and when a user selects an item it will go back to the left menu. The clicked left menu item text will be updated with the selected text from the pushed viewcontroller.

Ayaz

hope let files encoding with UTF8

i reference all AMSlideMenu files which encoding with ASCII. but all other files in my project is encoding with UTF8.
then my storyboard can't link to any ViewController which inherit AMSlideMenu's class

i was lost several hours for this issus

Disabling Pan Gesture Recognizer

In your documentation you have code to disable the Pan gesture for right, and left.
but it seems to only work outside of story board. I am using story board for my application, so unfortunately the code did not work.
Do you have a code to disable even with the use of storyboard?

Accessibility

Hi,

Great slide menu, really easy to use, however, it fails on the accessibility side of things (try with VoiceOver enabled).

The menus are selectable within the main screen.
A few fixes:
Within AMSlideMenuMainViewController.m
closeLeftMenuAnimated - completion and closeRightMenuAnimated within
add self.leftMenu.view.hidden=YES;

closeRightMenuAnimated - completion and closeRightMenuAnimated within
add self.rightMenu.view.hidden=YES;

Within setup add
self.leftMenu.view.hidden=YES;
add self.rightMenu.view.hidden=YES;

Finally, add an accessibility label to your menu buttons.

The only problem this leaves is your main screen elements are selectable within the slide menus. Not quite sure how to fix this at the moment.

Thanks once again for a great menu system.
Matthew.

How to push VC from rightMenuWillOpen

I am creating an app that has left and right menus. I would like the right menu to require that the user is logged in. I found the rightMenuWillOpen method and have added this to my MainVC.m file. If the user is not logged in then I would like to show a LoginVC instead of the RightMenuVC. Should I add the LoginVC to the storyboard without a segue and programmatically invoke this? After a successful login, I would then like to have the right menu slide out.

I have 2 questions:

  1. Is the MainVC the right place for the "rightMenuWillOpen" to be called or should it be in the RightMenuVC?
  2. How do I load the LoginVC programmatically?

right slide menu button

Okay so I've erased the code to be able to add my own button in storyboard..
now how do I connect the button that I've created to open up the right slide menu?

In AMSlideMenuContentSegue.m I've erased this code

}

if (mainVC.rightMenu)
{
    UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [mainVC configureRightMenuButton:rightBtn];
    [leftBtn addTarget:mainVC action:@selector(openrightMenu) forControlEvents:UIControlEventTouchUpInside];

    navItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightBtn];
}

then I added my custom Button in storyboard. I'm having problems connecting it to open up the right slide menu..

any ideas?

Tutorial and maybe a bug

Hi,

First i wanna tell you that your Menu seems amazing.
I work on a project with Xib and when i use AMSlideMenu my application loose control (black background ... and no control of button).
When you think you could purpose a tutorial for xib.
Thank U

My mail is [email protected]

Hope to have news from you soon

Sorry for my bad english

Drag Interception

When i set SKView in some Navigation View - can't handle drag smth. inside this SKView, because of AMSlideMenuMainViewController interception.

it can combine with xib?

hi guys, it is nice job. btw, it can combine with xib file, i notice it just only use with storyboard, right?

Added ability to work with external storyboard files in addition to segues

Hey there I added the ability to add external storyboard files to the lib; I forked your repo on my account; you can see the changes if you are interested.

If the segue is not found it will look for it as if its a ViewController Identifier; you can also customize which storyboard file to load from; if it still does not find it i will throw an assertion but not crash.

Thanks for this cool lib

Intercepts ScrollsToTop

Somewhere this class intercepts the method fired when the user hits the status bar. Even if the tableview set in the menu's are setScrollsToTop:NO the views in the content in the NavigationController don't respond.

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

Right slide menu button

okay I've set an action for my custom button that I've created in storyboard. but it's saying that the identifier wasn't declared. the error message is in the bottom where the Button's action is.
where should it be declared,
and what exactly should be declared??

//
// KeyboardViewController.m
// AMSlideMenu
//
// Created by Neo Winston on 2/19/14.
// Copyright (c) 2014 Artur Mkrtchyan. All rights reserved.
//

import "KeyboardViewController.h"

@interface KeyboardViewController ()

@Property (weak, nonatomic) IBOutlet UIButton *c_button;
@Property (weak, nonatomic) IBOutlet UIButton *d_button;
@Property (weak, nonatomic) IBOutlet UIButton *e_button;
@Property (weak, nonatomic) IBOutlet UIButton *f_button;
@Property (weak, nonatomic) IBOutlet UIButton *g_button;
@Property (weak, nonatomic) IBOutlet UIButton *a_button;
@Property (weak, nonatomic) IBOutlet UIButton *b_button;

@EnD

@implementation KeyboardViewController

@synthesize keyboardScrollView;

  • (void)viewDidLoad
    {
    [super viewDidLoad];

    //Keyboardscroller
    [keyboardScrollView setScrollEnabled:YES];

    [keyboardScrollView setContentSize:CGSizeMake(1665, 187)];

    [keyboardScrollView setContentOffset:CGPointMake(535, 0)];

    [keyboardScrollView flashScrollIndicators];
    }

  • (void)didReceiveMemoryWarning
    {
    [super didReceiveMemoryWarning];

}

  • (IBAction)c_chords:(id)sender {
    NSLog (@"c chords");
    }

  • (IBAction)d_chords:(id)sender {
    NSLog (@"d chords");
    }

  • (IBAction)e_chords:(id)sender {
    NSLog (@"e chords");
    }

  • (IBAction)f_chords:(id)sender {
    NSLog (@"f chords");
    }

  • (IBAction)g_chords:(id)sender {
    NSLog (@"g chords");
    }

  • (IBAction)a_chords:(id)sender {
    NSLog (@"a chords");
    }

  • (IBAction)b_chords:(id)sender {
    NSLog (@"b chords");
    }

  • (IBAction)button:(id)sender {

    - (void) openrightMenu:(id)sender
    {
        [[self mainSlideMenu] openRightMenu];
    }
    

}
@EnD
screen shot 2014-02-24 at 9 45 32 pm

Left and Right Menus

I'm not sure but there seem to be no functions called when either the left or right menu is called, is there a way I can emulate this functionality? I want to add a tutorial screen when you first view the right menu and I don't want to use delegates that are on the content view as that will mean I have to repeat this code in every content view.

Regards.

UIButton lag when in UIScrollView

here's another bug I've come across..
if a scrollview is placed inside a Viewcontroller, and a button inside the scrollview, then the button becomes super laggy..
I kind of have an idea why this is happening, but no idea how to fix it.

I created the buttons in storyboard

screen shot 2014-02-26 at 12 36 46 am

Idea

This is one of the nicests side menus I have seen. Do you think it would be a lot of work to set an option to allow the right / left side menu t come out like the Google+ iOS app and eBays ioS7 app - where the side menu is on top and covers 3/4 of the screen?

The left and right menu should be a UIViewController

Thanks for your very nice control. However, it is better if you can change the Left and Right Menu become UIViewController. It leads to unlimited ways of customization in this control.

For example, if I want add 2 stick views at top (for User Info such as Image, followers ...) and the other at bottom for sign in sign out. The rest space will be the tableview for menu items. UITableViewController makes difficult to implement some thing like that but UIViewController can.

Issue in disableSlidePanGestureForLeftMenu

I have followed your instruction in CUSTOMIZATION section, so I did the following:-

  • I imported UIViewController+AMSlideMenu.h
  • In ViewDidLoad method, I called [self disableSlidePanGestureForLeftMenu]

But I'm still able to open the left menu by sliding the page.

Is what I am doing is wrong or there is some issue?

Can't Subclass

I can't subclass my main view as it is already using a third party call JSMessagesViewController, how can I achieve the main menu button without a subclass

UIActivityViewController after stop works disableSlidePanGestureForLeftMenu

Hi,

I have a problem. I use UIActivityViewController.

My code:

  • (void)share
    {
    ...
    UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:itemsToShare applicationActivities:nil];
    activityVC.excludedActivityTypes = @[UIActivityTypePrint, UIActivityTypeCopyToPasteboard, UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll];
    [activityVC setCompletionHandler:^(NSString *activityType, BOOL completed){
    self.navigationController.navigationBarHidden = YES;
    self.navigationController.navigationBar.alpha = 0;
    [self disableSlidePanGestureForLeftMenu]; <--- i try this line but doesn't work
    }];

    [self presentViewController:activityVC animated:YES completion:nil];
    }

  • (void)viewWillAppear:(BOOL)animated
    {
    [super viewWillAppear:animated];
    [self disableSlidePanGestureForLeftMenu];
    }

The beginning "disableSlidePanGestureForLeftMenu" is works but then i click share button stops working.

Thanks.

Unrecognized selector sent to Instance when used with TabBarController as Root

Would it be possible for you to add an example that makes use of AMSlideMenu with a tab bar controller?

I have a project that has the following structure:

TabBarController -> Navigation Controller -> MainAMSlideMenuVC -> RightMenuVC -> MyContentVC

Seems to be throwing up an "Unrecognized selector" error when my tab bar is the root view.

remove slider after pop a viewcontroller

When i push i controller through slider menu it is disable . coz i have wright in view will appear [self disableSlidePanGestureForLeftMenu]; and it will disable. Now i am going second view to third view it is disable slide now when i pop third to second view it will automatically slide.
while in second view i have wright in viewwillappear .
so please give a solution of this problem.

Adding "thirdSegue"

Hello!
First of all thanks a lot for AMSlideMenu and great tutorial. But now i have a little problem. In your tutorial you have two rows - Row1 and Row2. Now i need to add third row. I add new "Table view Cell" to table view and do everything like you do in your tutorial, but when I click on the third row, that i add, nothing happens.
Please help, how to solve this problem?

Message sent to deallocated instance

So I started playing with this, and kudos. Super simple to implement and gorgeous.

I've noticed when I select an item from my menu, and then suspend my app, that Im getting a crash. Zombies reveal its "message sent to deallocated instance" from my content VC's.

I thought it might be something Im doing, but noticing in the demo project as well.

AMSlideMenu with TabBarController

Hello, first of all, thank you for this script, it's really great!

But I have tried to modify (in the demo), and instead of putting a navigationController I changed for tabBarController and click the firstRow or secondRow the application goes down, you can not use a tabBarController?

No Animation on Left Slide

There's no animation on Left slide..
Is there any way I can add your transition when I swipe to the left?
whats the code thats needed for it?

Thank you!

closeLeftMenuAnimated not animating.

Hi

Great app!

I am having trouble with closing animation.

When opening the menu, it's got animation but only when closing it, it doesn't have animation.

Is there anything I might have missed?

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.