All Projects → bestwnh → Igldropdownmenu

bestwnh / Igldropdownmenu

Licence: mit
An iOS drop down menu with pretty animation and easy to customize.

Projects that are alternatives of or similar to Igldropdownmenu

Tippyjs React
React component for Tippy.js (official)
Stars: ✭ 1,081 (-11.25%)
Mutual labels:  menu, dropdown
Accordion
Silky-smooth accordion widgets with no external dependencies.
Stars: ✭ 32 (-97.37%)
Mutual labels:  dropdown, menu
clicky-menus
Simple click-triggered navigation submenus. Accessible and progressively enhanced.
Stars: ✭ 76 (-93.76%)
Mutual labels:  dropdown, menu
React Menu
React component for building accessible menu, dropdown, submenu, context menu and more.
Stars: ✭ 237 (-80.54%)
Mutual labels:  menu, dropdown
Easydropdown
A lightweight library for building beautiful styleable <select> elements
Stars: ✭ 337 (-72.33%)
Mutual labels:  menu, dropdown
Dropdownmenukit
UIKit drop down menu, simple yet flexible and written in Swift
Stars: ✭ 246 (-79.8%)
Mutual labels:  menu, dropdown
react-native-select-pro
React Native dropdown (select) component developed by Mobile Reality
Stars: ✭ 79 (-93.51%)
Mutual labels:  dropdown, menu
React Dropdown Select
Customisable dropdown select for react
Stars: ✭ 227 (-81.36%)
Mutual labels:  menu, dropdown
Vue Stripe Menu
Creating a navigation menu with animations like on Stripe
Stars: ✭ 266 (-78.16%)
Mutual labels:  menu, dropdown
react-native-panel
A Customizable React Native Panel for Android and iOS
Stars: ✭ 35 (-97.13%)
Mutual labels:  dropdown, menu
Ember Select Box
🔠 A faux select box for Ember apps
Stars: ✭ 60 (-95.07%)
Mutual labels:  menu, dropdown
Kpdropmenu
KPDropMenu is an Objective-C port of HADropDown With Additional features
Stars: ✭ 50 (-95.89%)
Mutual labels:  menu, dropdown
React Native Dropdown Picker
A single / multiple, categorizable & searchable item picker (dropdown) component for react native which supports both Android & iOS.
Stars: ✭ 230 (-81.12%)
Mutual labels:  menu, dropdown
Easydropdown
💧 Fantastic dropdown in Swift
Stars: ✭ 254 (-79.15%)
Mutual labels:  menu, dropdown
Ifmmenu
仿微信添加菜单
Stars: ✭ 235 (-80.71%)
Mutual labels:  menu, dropdown
ContextMenuSwift
A better version of iOS 13 Context Menu
Stars: ✭ 162 (-86.7%)
Mutual labels:  dropdown, menu
Dopdropdownmenu Enhanced
DOPDropDownMenu 添加双列表 优化版 新增图片支持(double tableView, The optimization version ,new add image,detailText)
Stars: ✭ 1,757 (+44.25%)
Mutual labels:  menu, dropdown
Azdropdownmenu
A simple dropdown menu component for iPhone
Stars: ✭ 198 (-83.74%)
Mutual labels:  menu, dropdown
Menu
The most customizable menu for macOS apps.
Stars: ✭ 84 (-93.1%)
Mutual labels:  dropdown, menu
Dropdownmenu
DropDownMenu for Android,Filter the list based on multiple condition.
Stars: ✭ 815 (-33.09%)
Mutual labels:  menu, dropdown

IGLDropDownMenu

An iOS drop down menu with pretty animation.

Screenshot

How To Use

Use CocoaPods:

pod 'IGLDropDownMenu'

Manual Install:

Just drap the files in folder IGLDropDownMenu to your project.

####!Try the demo. It's really helpful!

Sample Code

  1. Create your IGLDropDownItem array and set up

    NSMutableArray *dropdownItems = [[NSMutableArray alloc] init];
    IGLDropDownItem *item = [[IGLDropDownItem alloc] init];
    [item setIconImage:[UIImage imageNamed:@"icon.png"]];
    [item setText:@"title"];
    [dropdownItems addObject:item];
    
  2. Create your IGLDropDownMenu and set the up the parameter name dropDownItems

    IGLDropDownMenu *dropDownMenu = [[IGLDropDownMenu alloc] init];
    [dropDownMenu setFrame:CGRectMake(0, 0, 200, 45)];
    dropDownMenu.menuText = @"Choose Weather";
    dropDownMenu.menuIconImage = [UIImage imageNamed:@"chooserIcon.png"];
    dropDownMenu.paddingLeft = 15;  // padding left for the content of the button
    
  3. modify the params of IGLDropDownMenu

    dropDownMenu.type = IGLDropDownMenuTypeStack;
    dropDownMenu.gutterY = 5;
    dropDownMenu.itemAnimationDelay = 0.1;
    dropDownMenu.rotate = IGLDropDownMenuRotateRandom;
    
  4. Call the reloadView method (Very Important!)

    // every time you change the params you should call reloadView method
    [dropDownMenu reloadView];
    

Parameters

These are just some of the parameters you can use, you can find more(or make more) in the code.

####For IGLDropDownMenu

  • animationDuration set the duration(s) of the animation in second

  • animationOption set the UIViewAnimationOptions for the animation

  • itemAnimationDelay set the delay(s) before each of item start to animate

  • direction set the direction when the menu expand

  • IGLDropDownMenuDirectionDown default value, expand downward
  • IGLDropDownMenuDirectionUp expand upward
  • rotate set the rotate style when the menu on expand
  • IGLDropDownMenuRotateNone default value, for no rotate
  • IGLDropDownMenuRotateLeft rotate to left on expand
  • IGLDropDownMenuRotateRight rotate to right on expand
  • IGLDropDownMenuRotateRandom rotate random on expand every single time
  • type set the menu type (remember when you set the type to SlidingIn* you can't have the rotate type at the same time.)
  • IGLDropDownMenuTypeNormal default value, item will hide behind the menu button on fold
  • IGLDropDownMenuTypeStack item will hide behind the menu button and make a stack like look
  • IGLDropDownMenuTypeSlidingInBoth item will slide in and out from both sides
  • IGLDropDownMenuTypeSlidingInFromLeft item will slide in from left
  • IGLDropDownMenuTypeSlidingInFromRight item will slide in from right
  • IGLDropDownMenuTypeFlipVertical item will flip vertical
  • IGLDropDownMenuTypeFlipFromLeft item will flip from left
  • IGLDropDownMenuTypeFlipFromRight item will flip from right
  • slidingInOffset set the offset value for the items slide in and out
  • gutterY set the Y gutter between items
  • alphaOnFold set the item alpha value when menu on fold, only use this when the style won't fit your mind
  • flipWhenToggleView when you set this to true, the menu button will flip up when you click
  • useSpringAnimation use the spring animation for iOS7 or higher version, default is true
  • menuButtonStatic keeps the menu button static regardless of selected menu item, default is NO

####For IGLDropDownItem

  • iconImage set the icon image for the item
  • text set the text string for the item
  • textLabel for you to adjust the text label style
  • object you can store your custom item in this property
  • index the item index
  • paddingLeft the left padding of the image view or only text
  • showBackgroundShadow you can hide the drop down shadow with this property
  • backgroundColor you can change the background color with this property

Remember the menuButton in IGLDropDownMenu is also an IGLDropDownItem.

CustomView

If you want to control the view by yourself, you can use the initWithMenuButtonCustomView of IGLDropDownMenu and initWithCustomView of IGLDropDownItem. If you use customView, the customView will auto set userInteractionEnabled = NO and the menu menuButtonStatic = YES and some style parameters will be invalid. You need to handle it yourself. I make a customView in the demo, try it!

Delegate

####For IGLDropDownMenu

  • - (void)dropDownMenu:(IGLDropDownMenu*)dropDownMenu selectedItemAtIndex:(NSInteger)index;
  • - (void)dropDownMenu:(IGLDropDownMenu *)dropDownMenu expandingChanged:(BOOL)isExpanding;

Requirements

  • target platform: >=iOS 6.0 (I never test the version below 6.0, maybe you can make some try and tell me.)
  • ARC

Thanks

This drop-down menu idea is come from here, I found this demo one day and just implement it on iOS.

License

The MIT License (MIT)

Copyright (c) 2014 Galvin Li

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].