arturdev / amslidemenu2 Goto Github PK
View Code? Open in Web Editor NEWSliding Menu for iOS (Left and Right menus). Multiple storyboards and XIBs support.
License: MIT License
Sliding Menu for iOS (Left and Right menus). Multiple storyboards and XIBs support.
License: MIT License
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.
Hi,
Thanks for the grate effort.
Is it possible to have the menu bar to be placed not in the navigationbar?
if so, can you please clarify how.
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?
Hey i want to make gif image like yours. Please inform me which tool you are using.
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?
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
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.
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
on selection of a cell on the left menu, I want to change the left menu to another menu, how can I accomplish this?
nice project, can you add cocoapods support?
When i set SKView in some Navigation View - can't handle drag smth. inside this SKView, because of AMSlideMenuMainViewController interception.
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
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?
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
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.
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:
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?
hi guys, it is nice job. btw, it can combine with xib file, i notice it just only use with storyboard, right?
in a view i have a iutableview but don't work swipe on left to delete row.
Any idea?
thanks
Sabino
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.
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.
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?
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.
I have followed your instruction in CUSTOMIZATION section, so I did the following:-
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 you configure menu buttons in storyboards and still be able to use addrightbutton, addleftbutton? I basically want to move the button closer to the edge.
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!
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
Hey thanks for Such a nice control, well design and easy to use.it is almost the same control what i was looking for but unfortunality it missing the page flipping Transitions like this app https://itunes.apple.com/us/app/best-unit-converter-for-iphone/id727632233?mt=8 or
.i want to add the above animation for left and right menue using your control, is it possible ? if yes then please suggest way for it. i will be grateful. Thanks in advance.
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?
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
Hi,
is it possible to use a custom UIViewController or UINavigationController as rightMenu instead of a UITableViewController ?
I want to use the right panel for something non-menu related.
Thanks!
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.
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.
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.
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.
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.
//
@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;
@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
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).
@arturdev
Hi!
compatible with IOS5 and IOS6๏ผ
Jack
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.
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
Is it posible to use this control without using Storyboards ??
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.