Latest 0.1.0
Homepage https://github.com/Cokile/CCDropDownMenu
License MIT
Platforms ios , requires ARC
Authors

CCDropDownMenu

CCDropDownMenu
CCDropDownMenu
CCDropDownMenu
Carthage compatible

CCDropDownMenu now features

Type
ManaDropDownMenu
GaiDropDownMenu
SyuDropDownMenu

Installation

Cocoapods

pod 'CCDropDownMenus'

Carthage

github "Cokile/CCDropDownMenu"

Manually

Add all the files in the CCDropDownMenu folder to your project.

ManaDropDownMenu

CCDropDownMenu

Easy to use

#import <CCDropDownMenus/CCDropDownMenus.h>

// ...
@interface ViewController () <CCDropDownMenuDelegate>

// ...
- (void)viewDidLoad {
    // ...
    ManaDropDownMenu *menu = [[ManaDropDownMenu alloc] initWithFrame:<#CGRect#> title:<#NSString#>];
    menu.delegate = self;
    menu.numberOfRows = <#NSInteger#>;
    menu.textOfRows = @[<#NSString#>, <#NSString#>, <#NSString#>, ...];
    [self.view addSubview:menu];
}

- (void)dropDownMenu:(CCDropDownMenu *)dropDownMenu didSelectRowAtIndex:(NSInteger)index {
    // ...
}

Customisable

// The color that applys to the title and the arrow when the drop down menu is expanded. Default value is a orange color.
menu.activeColor = <#UIColor#>;

// The color that applys to the title and the arrow when the drop down menu is closed. Default value is a gray color.
menu.inactiveColor = <#UIColor#>;

// The color that applys to the seperator for the title and the indicator. Default value is a gray color.
menu.seperatorColor = <#UIColor#>;

// The color that applys to the title view. Default value is a white color.
menu.titleViewColor = <#UIColor#>;

// The string that applys to the title for the drop down menu.
menu.title = <#NSString#>;

// The image that applys to the right indicator for the drop down menu. Default value is a arrow image.
menu.indicator = <#UIImage#>;

// The value that applys to the gutter distance between list view. Default value is 0.
menu.gutter = <#CGFloat#>;

// The boolean value that indicates the weahter apply a resilient when expansion. Default value is NO.
// Getter is isResilient
menu.resilient = <#BOOL#>;

// The value that applys to the height for row of the drop down menu.
menu.heightOfRows = <#CGFloat#>;

// The strings that represent the name of the image for each row.
menu.imageNameOfRows = @[<#NSString#>, @<#NSString#>, <#NSString#>, ...];

// The colors that applys to background color for each row.   
menu.colorOfRows = @[<#UIColor#>, <#UIColor#>, <#UIColor#>, ...];

GaiDropDownMenu

CCDropDownMenu

Easy to use

#import <CCDropDownMenus/CCDropDownMenus.h>

// ...
@interface ViewController () <CCDropDownMenuDelegate>

// ...
- (void)viewDidLoad {
    // ...
    GaiDropDownMenu *menu = [[GaiDropDownMenu alloc] initWithFrame:<#CGRect#> title:<#NSString#>];
    menu.delegate = self;
    menu.numberOfRows = <#NSInteger#>;
    menu.textOfRows = @[<#NSString#>, <#NSString#>, <#NSString#>, ...];
    [self.view addSubview:menu];
}

- (void)dropDownMenu:(CCDropDownMenu *)dropDownMenu didSelectRowAtIndex:(NSInteger)index {
    // ...
}

Customisable

// The color that applys to the title and the arrow when the drop down menu is expanded. Default value is a orange color.
menu.activeColor = <#UIColor#>;

// The color that applys to the title and the arrow when the drop down menu is closed. Default value is a gray color.
menu.inactiveColor = <#UIColor#>;

// The color that applys to the seperator for the title and the indicator. Default value is a gray color.
menu.seperatorColor = <#UIColor#>;

// The color that applys to the title view. Default value is a white color.
menu.titleViewColor = <#UIColor#>;

// The string that applys to the title for the drop down menu.
menu.title = <#NSString#>;

// The image that applys to the right indicator for the drop down menu. Default value is a arrow image.
menu.indicator = <#UIImage#>;

// The value that applys to the gutter distance between list view. Default value is 0.
menu.gutter = <#CGFloat#>;

// The boolean value that indicates the weahter apply a resilient when expansion. Default value is NO.
// Getter is isResilient
menu.resilient = <#BOOL#>;

// The boolean value that indicates that whether the rows show from the same side when expansion. Default value is NO.
// Getter is doesAppearFromOneSide
menu.appearFromOneSide = <#BOOL#>;

// The value that applys to the height for row of the drop down menu.
menu.heightOfRows = <#CGFloat#>;

// The strings that represent the name of the image for each row.
menu.imageNameOfRows = @[<#NSString#>, @<#NSString#>, <#NSString#>, ...];

// The colors that applys to background color for each row.   
menu.colorOfRows = @[<#UIColor#>, <#UIColor#>, <#UIColor#>, ...];

SyuDropDownMenu

CCDropDownMenu

Easy to use

#import <CCDropDownMenus/CCDropDownMenus.h>

// ...
@interface ViewController () <CCDropDownMenuDelegate>

// ...
- (void)viewDidLoad {
    // ...
    // You should set the batTintColor of the navigation first.
    SyuDropDownMenu *menu = [[SyuDropDownMenu alloc] initWithNavigationBar:<#UINavigationBar#> useNavigationController:<#BOOL#>;
    menu.delegate = self;
    menu.numberOfRows = <#NSInteger#>;
    menu.textOfRows = @[<#NSString#>, <#NSString#>, <#NSString#>, ...];
    [self.view addSubview:menu];
}

- (void)dropDownMenu:(CCDropDownMenu *)dropDownMenu didSelectRowAtIndex:(NSInteger)index {
    // ...
}

Customisable

// The color that applys to the title and the arrow when the drop down menu is expanded. Default value is a light blue color.
menu.activeColor = <#UIColor#>;

// The color that applys to the title and the arrow when the drop down menu is closed. Default value is a gray color.
menu.inactiveColor = <#UIColor#>;

// The color that applys to the title view. Default value is the bar tint color of the navigation bar.
menu.titleViewColor = <#UIColor#>;

// The image that applys to the right indicator for the drop down menu. Default value is a arrow image.
menu.indicator = <#UIImage#>;

// The value that applys to the gutter distance between list view. Default value is 0.
menu.gutter = <#CGFloat#>;

// The boolean value that indicates the weahter apply a resilient when expansion. Default value is NO.
// Getter is isResilient
menu.resilient = <#BOOL#>;

// The value that applys to the height for row of the drop down menu.
menu.heightOfRows = <#CGFloat#>;

// The colors that applys to background color for each row.   
menu.colorOfRows = @[<#UIColor#>, <#UIColor#>, <#UIColor#>, ...];

Requirement

CCDropDownMenu requires ARC.

TODO

  • More types of drop down menu.
  • Performance improvement

Any Pull Requests and issues are welcome.

Latest podspec

{
    "name": "CCDropDownMenu",
    "platforms": {
        "ios": null
    },
    "version": "0.1.0",
    "license": {
        "type": "MIT"
    },
    "homepage": "https://github.com/Cokile/CCDropDownMenu",
    "authors": {
        "Cokile": "[email protected]"
    },
    "summary": "Beautiful drop down menus, written in Objective-C.",
    "source": {
        "git": "https://github.com/Cokile/CCDropDownMenu.git",
        "tag": "v0.1.0"
    },
    "source_files": "CCDropDownMenu/*",
    "requires_arc": true
}

Pin It on Pinterest

Share This