Latest 1.1.1
Homepage https://github.com/eejahromi/EEJSelectMenu
License MIT
Platforms ios 8.0
Authors




EEJSelectMenu is a responsive single selection menu for iOS.
Project allows for implementing a menu with different number of buttons and different animations for appearance.
It will adjust the button sizes based on the device screen size!
Just provide the names for the buttons and the menu will take care of the number and layout of the buttons!

Demo

Animation: FadeIn & Widen

Animation: Scale & MoveInFromLeft

Animation: MoveInFromRight & Alternate

Version 1.1.1

Installation

Using CocoaPods

EEJSelectMenu is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'EEJSelectMenu'

Using Source Files

Add the files in the Classes/ folder to your project

Import the header file to your source code

#import "EEJSelectMenu.h"

Getting Started

  • Initializers
    • -initWithButtons:animationStyle:color:andDelegate:
    • -initWithButtons:animationStyle:colors:

Create an instance of EEJSelectMenu and provide button names and color

    NSArray *buttonNames = @[@"ONE",@"TWO",@"THREE",@"FOUR"];
    EEJSelectMenu *menu = [[EEJSelectMenu alloc]initWithButtons:buttonNames
                                                 animationStyle:EEJAnimationStyleFadeIn
                                                          color:[UIColor darkGrayColor] 
                                                          andDelegate:self];
    [self presentViewController:menu animated:NO completion:nil];

For Multi-Color menu use this initializer

    NSArray *buttonNames = @[@"ONE",@"TWO",@"THREE",@"FOUR"];
    EEJSelectMenu *menu = [[EEJSelectMenu alloc]initWithButtons:buttonNames
                                                 animationStyle:EEJAnimationStyleFadeIn
                                                    colors:@[[UIColor redColor],[UIColor greenColor]
                                                        [UIColor blueColor],[UIColor orangeColor]] ];
    menu.delegate = self;

    [self presentViewController:menu animated:NO completion:nil];

Or simple initializer with the default color

    EEJSelectMenu *menu = [[EEJSelectMenu alloc]init];
    menu.buttonNames = @[@"ONE",@"TWO",@"THREE",@"FOUR"];
    menu.animationStyle = EJAnimationStyleAlternate;
    menu.delegate = self;
    // default color is light blue

    [self presentViewController:menu animated:NO completion:nil];
Note: for smoother animation set the animated property to "NO" when presenting the menu as shown above.

AnimationStyle

    menu.animationStyle = EJAnimationStyleFadeIn; // default
  • Other AnimationStyles Available:
    • EJAnimationStyleWiden
    • EJAnimationStyleScale
    • EJAnimationStyleMoveInFromLeft
    • EJAnimationStyleMoveInFromRight
    • EJAnimationStyleAlternate

Delegate Methods

EEJSelectMenu provides two delegate methods

    -(void)EJSelectMenuButtonWasPressedWithTitle:(NSString *)title;
    -(void)EJSelectMenuButtonWasPressedWithTag:(long)tag;

    // button tags start at 100 and increment by one for each
Other configurations:

Change selected button color (default: Purple)

    menu.selectedButtonColor = [UIColor blueColor];

Change menu background color (default: White)

    menu.menuBackgroundColor = [UIColor redColor];

License:

EEJSelectMenu is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "EEJSelectMenu",
    "version": "1.1.1",
    "summary": "Single selection menu with cool animations",
    "description": "This Cocoapod allows for implementing a menu with different number of buttons and different animations for appearance. It will adjust the button sizes based on the device screen size!",
    "homepage": "https://github.com/eejahromi/EEJSelectMenu",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ehsan Jahromi": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/eejahromi/EEJSelectMenu.git",
        "tag": "1.1.1"
    },
    "source_files": [
        "Classes",
        "Classes/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude"
}

Pin It on Pinterest

Share This