{"id":13684958,"url":"https://github.com/aryaxt/iOS-Slide-Menu","last_synced_at":"2025-05-01T00:34:00.805Z","repository":{"id":8224673,"uuid":"9663523","full_name":"aryaxt/iOS-Slide-Menu","owner":"aryaxt","description":"iOS Slide Menu with ability to add both left and right menu, and built in gesture recognizer. Similar to Path and Facebook","archived":false,"fork":false,"pushed_at":"2019-03-01T01:28:19.000Z","size":2704,"stargazers_count":1524,"open_issues_count":97,"forks_count":359,"subscribers_count":68,"default_branch":"master","last_synced_at":"2024-11-11T23:37:41.855Z","etag":null,"topics":["ios","side-menu"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aryaxt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-25T04:05:34.000Z","updated_at":"2024-11-04T06:37:42.000Z","dependencies_parsed_at":"2022-08-06T22:15:36.502Z","dependency_job_id":null,"html_url":"https://github.com/aryaxt/iOS-Slide-Menu","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryaxt%2FiOS-Slide-Menu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryaxt%2FiOS-Slide-Menu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryaxt%2FiOS-Slide-Menu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryaxt%2FiOS-Slide-Menu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aryaxt","download_url":"https://codeload.github.com/aryaxt/iOS-Slide-Menu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224230679,"owners_count":17277373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","side-menu"],"created_at":"2024-08-02T14:00:41.234Z","updated_at":"2024-11-12T06:30:57.009Z","avatar_url":"https://github.com/aryaxt.png","language":"Objective-C","funding_links":[],"categories":["Objective-C"],"sub_categories":[],"readme":"iOS-Slide-Menu [![Version](http://cocoapod-badges.herokuapp.com/v/iOS-Slide-Menu/badge.png)](http://cocoadocs.org/docsets/iOS-Slide-Menu)\n---------\n\n**NOTE: If your application supports both landscape and portrait and supports iOS versions below 8, use version 1.4.5**\n\niOS Slide Menu built on top of UINavigationController, with configurable buttons, reveal animations, and tap/swiper gesture recognizers.\n\n- [Setup](https://github.com/aryaxt/iOS-Slide-Menu#setup)\n- [Enable/Disable Left/Right Menu](https://github.com/aryaxt/iOS-Slide-Menu#configuring-left-and-right-menu-for-different-viewcontrollers)\n- [Public Properties](https://github.com/aryaxt/iOS-Slide-Menu#public-properties)\n- [Public Methods](https://github.com/aryaxt/iOS-Slide-Menu#public-methods)\n- [Custom Animations](https://github.com/aryaxt/iOS-Slide-Menu#custom-animations)\n- [Notifications](https://github.com/aryaxt/iOS-Slide-Menu#notifications)\n\n![alt tag](https://raw.github.com/aryaxt/iOS-Slide-Menu/master/slideMenuAnimation.gif)\n\nVersion 1.4.5 Notes\n---------\nEnabling shouldRecognizeSimultaneouslyWithGestureRecognizer was causing issues, if you are seeing unexpected gesture behavior delete the pod and reinstall as that method has been removed\n\nVersion 1.4.0 Notes\n---------\n```switchToViewController:withCompletion:``` method has been deprecated. In order to get the exact same behavior use ```popToRootAndSwitchToViewController:withCompletion```\n\nNew features:\n- Allows limiting pan gesture to the sides of the view\n- Allows turning shadow on/off\n- Allows turning slide-out animation on/off when switching between viewControllers\n- Minor bug fixes\n\nVersion 1.3.0 Notes\n---------\nIf you are updating from previous versions you'll get compile errors, due to changes to RevealAnimations.\nAnimation configuration is now handled differently, and is separated from the SlideNavigationController.\nPlease see bwlow for more information.\n\nSetup\n---------\n```\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n\tLeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init];\n        RightMenuViewController *rightMenu = [[RightMenuViewController alloc] init];\n\t\n\t[SlideNavigationController sharedInstance].rightMenu = rightMenu;\n\t[SlideNavigationController sharedInstance].leftMenu = leftMenu;\n\t\n    // Override point for customization after application launch.\n    return YES;\n}\n```\nConfiguring Left and Right menu for different Viewcontrollers\n---------\nYou 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.\n```\n@interface MyViewController : UIViewController \u003cSlideNavigationControllerDelegate\u003e\n@end\n```\n```\n@implementation MyViewController\n\n- (BOOL)slideNavigationControllerShouldDisplayLeftMenu\n{\n        return YES;\n}\n\n- (BOOL)slideNavigationControllerShouldDisplayRightMenu\n{\n\treturn YES;\n}\n\n@end\n```\n\nPublic properties\n---------\n###### avoidSwitchingToSameClassViewController\nDefault value is set to YES.\nIf 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.\n\nIf set to NO it'll switch to the viewController regardless of types\n\nThis 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\n###### enableSwipeGesture\nWhen set to YES user can swipe to open the menu\n\nWhen set to NO swipe is disabled, and use can only open the menu using the UIBarButtonItem added to the navigationBar\n######panGestureSideOffset\nThis 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.\n\nDefault 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.\n###### enableShadow\nA boolean that allows you to turn shadow on/off. On default shadow is set to true\n###### rightMenu\nThe viewController of the right menu in the navigationController\n###### leftMenu\nThe viewController of the left menu in the navigationController\n###### leftBarButtonItem\nDefault 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)\n###### rightBarButtonItem\nBehaves exactly the same as leftbarButtonItem, but it's used as the right button for the menu\n###### portraitSlideOffset\nDefault 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\n###### landscapeSlideOffset\nDefault 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\n###### menuRevealAnimationDuration\nDefault value of animation duration is .3, this property allows configuring animation duration\n###### menuRevealAnimationOption\nDefaults to UIViewAnimationOptionCurveEaseOut, you can change this property to configure animation options\n###### menuRevealAnimator\nmenuRevealAnimator 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. \n\nThere are existing animation classes that can be used. These animation classes can be configured through init method options.\n\n- SlideNavigationContorllerAnimatorSlide\n- SlideNavigationContorllerAnimatorFade\n- SlideNavigationContorllerAnimatorScale\n- SlideNavigationContorllerAnimatorScaleAndFade\n- SlideNavigationContorllerAnimatorSlideAndFade\n\n```\nSlideNavigationContorllerAnimatorSlideAndFade *alideAndFadeAnimator = [[SlideNavigationContorllerAnimatorSlideAndFade alloc] initWithMaximumFadeAlpha:.8 fadeColor:[UIColor redColor] andSlideMovement:100];\n[SlideNavigationController sharedInstance].menuRevealAnimator = alideAndFadeAnimator;\n```\nPublic Methods\n---------\n###### + (SlideNavigationController *)sharedInstance;\nReturns the singleton instance of SlideNavigationController\n\n###### - (void)switchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;\nThis method is deprecated\n\n###### - (void)popToRootAndSwitchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;\nPops to root view controller and calls the completion.\n\n###### - (void)popToRootAndSwitchToViewController:(UIViewController *)viewController withSlideOutAnimation:(BOOL)slideOutAnimation andCompletion:(void (^)())completion;\nSimilar to previous method, but allows turning on/off slide-out-animation during the switch\n\n###### - (void)popAllAndSwitchToViewController:(UIViewController *)viewController withCompletion:(void (^)())completion;\nReplaces the ViewController stack with a new stack that includes the new ViewController, and calls completion\n\n###### - (void)popAllAndSwitchToViewController:(UIViewController *)viewController withSlideOutAnimation:(BOOL)slideOutAnimation andCompletion:(void (^)())completion;\nSimilar to previous method, but allows turning on/off slide-out-animation during the switch\n\n###### - (void)openMenu:(Menu)menu withCompletion:(void (^)())completion;\nOpens a given menu and calls the completion block oppon animation completion\n\n###### - (void)closeMenuWithCompletion:(void (^)())completion;\nCloses the menu and calls the completion block oppon animation completion\n\n###### - (void)toggleLeftMenu;\nToggles 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)\n\n```\nUIButton *button  = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];\n[button setImage:[UIImage imageNamed:@\"menu-button\"] forState:UIControlStateNormal];\n[button addTarget:[SlideNavigationController sharedInstance] action:@selector(toggleRightMenu) forControlEvents:UIControlEventTouchUpInside];\nUIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];\n[SlideNavigationController sharedInstance].rightBarButtonItem = rightBarButtonItem;\n```\n\n###### - (void)bounceMenu:(Menu)menu withCompletion:(void (^)())completion;\nBounces either right or left menu, and calls the completion block oppon animation completion\n###### - (void)toggleRightMenu;\nWorks exactly the same as toggleLeftMenu, but used to toggle left menu\n\n###### - (BOOL)isMenuOpen;\nReturns a boolean stating whether the menu is open or not\n\nCustom Animations\n---------\nSlideNavigationController 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.\n\n###### - (void)prepareMenuForAnimation:(Menu)menu;\nThis method gets called right before the menu is about to reveal\n###### - (void)animateMenu:(Menu)menu withProgress:(CGFloat)progress;\nThis method gets called as the menu reveal occurs, and passes the progress to be used for animations(progress is between 0 and 1)\n###### - (void)clear;\nThis 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.\nPublic Methods\n\nNotifications\n---------\n###### SlideNavigationControllerDidOpen\nThis notification is posted EVERY time the menu goes inot a complete open state\nUserinfo contains a value with key \"menu\", which could have 2 values \"left\" and \"right\"\n\n###### SlideNavigationControllerDidClose\nThis notification is posted EVERY time the menu goes inot a complete close state\nUserinfo contains a value with key \"menu\", which could have 2 values \"left\" and \"right\"\n\n###### SlideNavigationControllerDidReveal\nThis notification is posted once everytim a menu reveals\nUserinfo contains a value with key \"menu\", which could have 2 values \"left\" and \"right\"\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryaxt%2FiOS-Slide-Menu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faryaxt%2FiOS-Slide-Menu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryaxt%2FiOS-Slide-Menu/lists"}