Go to file
Aryan Ghassemi 373be13080 - Added scale animation 2014-01-26 12:28:45 -08:00
SlideMenu - Added scale animation 2014-01-26 12:28:45 -08:00
SlideMenu.xcodeproj - Fixed warnings 2013-12-31 10:51:22 -08:00
SlideMenuTests - Initial Upload 2013-04-24 21:09:33 -07:00
.gitignore Initial commit 2013-04-24 21:05:34 -07:00
License.txt - Updated Licensing to MIT 2013-08-28 20:49:25 -07:00
README.md Update README.md 2014-01-07 13:30:08 -08:00
iOS-Slide-Menu.podspec - Updated pod spec 2013-12-24 09:08:24 -08:00
screenshot.png - Resized screen shot 2014-01-03 13:23:45 -08:00
slideMenuAnimation.gif - Adding an animated gif to be used by the read me file 2014-01-07 13:27:52 -08:00

README.md

iOS-Slide-Menu

iOS Slide Menu built on top of UINavigationController.

Features:

  • Righ Menu
  • Left Menu
  • Configurable Buttons
  • Allows Enable/Disable menu by implmenting delegate methods
  • Tap/Swipe gesture recognizer to Open/Close the Menus

alt tag

Setup

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

Switch Between ViewControllers

Let's say a menu item was selected

SomeViewController *vc = [[SomeViewController alloc] init];
[[SlideNavigationController sharedInstance] switchToViewController:vc withCompletion:nil];

Configuring Left and Right menu for different Viewcontrollers

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

- (BOOL)slideNavigationControllerShouldDisplayLeftMenu
{
        return YES;
}

- (BOOL)slideNavigationControllerShouldDisplayRightMenu
{
	return YES;
}

@end

Configuring menu offset

Menu offset can be configured for both portrait and landscape mode

[SlideNavigationController sharedInstance].landscapeSlideOffset = 400;
[SlideNavigationController sharedInstance].portraitSlideOffset = 60;

Menu Reveal Animations

There are three types of animations that can be applied when revealing the menu

MenuRevealAnimationNone
MenuRevealAnimationFade
MenuRevealAnimationSlide
MenuRevealAnimationSlideAndFade

[SlideNavigationController sharedInstance].menuRevealAnimation = MenuRevealAnimationSlideAndFade;

The opacity applied during a fade animation can be configured using a property on SlideNavigationController called menuRevealAnimationFadeMaximumAlpha. This value can be anywhere between 0 and 1, and it represents the darkes a menu can become. The color of fade layer can also be configured using the property called menuRevealAnimationFadeColor

[SlideNavigationController sharedInstance].menuRevealAnimationFadeColor = [UIColor greenColor];
[SlideNavigationController sharedInstance].menuRevealAnimationFadeMaximumAlpha = .5;

The movement of menu during a slide animation can also be configured

[SlideNavigationController sharedInstance].menuRevealAnimationSlideMovement = 50;