bestwnh / igldropdownmenu Goto Github PK
View Code? Open in Web Editor NEWAn iOS drop down menu with pretty animation and easy to customize.
Home Page: https://www.cocoacontrols.com/controls/igldropdownmenu
License: MIT License
An iOS drop down menu with pretty animation and easy to customize.
Home Page: https://www.cocoacontrols.com/controls/igldropdownmenu
License: MIT License
Can you add CocoaPods integration to this library?
I have multiple drop down menus as well as some text fields. I would like to close the open menu if a textField becomes first responder, or another menu is tapped. Is there a delegate method to do that?
Good Day,
Thank you for the brilliant control. Its a real lifesaver.
I am trying to customize the textlabel on the dropdownitem. It doesn't seem to work. I have tried textcolor, backgroundcolor, shadowcolor.
No effect.
Kind regards
W
Is there a reloadView()
but for DropDownItem modifications?
I have the following:
let font = UIFont.init(name: "Avenir Next Medium", size: 15.0)
var items = [IGLDropDownItem]()
for type in options {
let item = IGLDropDownItem()
item.textLabel.font = font
item.textLabel.textAlignment = .Center
item.showBackgroundShadow = false
item.text = type
items.append(item)
}
dropdown.dropDownItems = items
dropdown.menuText = menuText
dropdown.type = .Normal
dropdown.menuButton.textLabel.font = font
dropdown.menuButton.textLabel.textAlignment = .Center
dropdown.menuButton.showBackgroundShadow = false
dropdown.reloadView()
self.view.addSubview(dropdown)
self.view.bringSubviewToFront(dropdown)
For my menuButton, the textLabel style is changing properly, but for the items themselves, the textLabel style is not changing at all. Am I missing something?
I also tried dropdown.reloadView()
after self.view.addSubview(dropdown)
I have three drop downs. No way to have the other two close when one opens.
Hello, I need to know how to implement this Library with UIbarButtonItem ?
I've tried to add the dropDownMenu button to the navigationItems but this make my app crash :
[IGLDropDownMenu _setOwningNavigationItem:]: unrecognized selector sent to instance
Great component! Very well done!
I was wondering if you plan to implement some kind of scrolling in case you have more items than the screen fits?
Great UI and animation. It can be better If can be scrolled.
When creating a IGLDropDownMenu via storyboards the constructor - (instancetype)initWithCoder:(NSCoder *)aDecoder
will be used. that's why it is not possible to init your menu button with a custom view.
my quickfix was to remove the readonly property of @property (nonatomic, strong) IGLDropDownItem *menuButton;
.
then i could set my custom menu button like this:
CustomDropDownItemView* customViewMenuButton = [[[NSBundle mainBundle] loadNibNamed:@"CustomDropDownItemView" owner:self options:nil] objectAtIndex:0];
customViewMenuButton.centeredImage.image = [UIImage imageNamed:@"ic_more_blue_36px"];
IGLDropDownItem* menuButton = [[IGLDropDownItem alloc] initWithCustomView:customViewMenuButton];
self.buttonDropDownMenu.menuButton = menuButton;
i don't know if this is correct in your opinion, but for me it worked. maybe there is another solution?
Will there be support for constraints?
Is there some way to have my own UIView/UIButton as the menu button, and when it is selected, have the dropdown come down?
Great work!
I have some other views right below the dropDown menu, is there a way to make the items appear on top of them when menu is expanded?
If anyone think it should re-write to a swift version, please leave a comment to tell me.
If this implement in swift, there are two plan:
Which one you prefer?
Is it possible to be compatible with storyboard in the future?
Hi,
is it possible to open menu from bottom to up?
it would be great if there is a property for it.
Can you please make the delegate
: @property (nonatomic, **weak**) id<IGLDropDownMenuDelegate> delegate;
My app crashes when the menu is currently open but I dealloc the viewcontroller which is also the delegate.
Currently I have to manually set the delegate to nil in the viewcontroller's dealloc
function
I've been trying to figure out how to close the menu when user taps somewhere on the screen. When users don't pick an option, or try to type something in a textField, I want to close the menu to keep the UI clean. How can I achieve this?
Hi,
in IGLDropDownMenuDirectionUp mode menu builds and looks good, but when I select any item the index is always 0.
I am using autolayouts and trying to set the width of IGLDropDownMenu by
[self.dropdownMenu setFrame:CGRect(0,50,250, 35);
However the menu item doesn't seem to expand. I added background to dropdownmenu for debugging and it shows that initially, dropdownmenu is of the right size but the menu item doesn't expand.
And on tap, the DropDownMenu width is also resized to menu item width.
How do I set width for menuItem? or ensure that the menuItem takes all the space for in dropdownmenu
When the menu item is more than 12, then it is not possible to scroll.
There is no scrolling functionality support in order to view remaining items.
I have two drop downs the second one is right below the firs one. When I open the first drop down it's expanded view hides behind the drop down below it. Please suggest a possible solution.
i tried to set multiple IGLDropDownMenu but when i expand first one second menu covers menu item of first dropdown menu.
can we have some suggestion from your side.
thanks for very clean and neat example.
I only seem to be able to instantiate 1 IGLDropDownMenu per view, otherwise only the last added IGLDropDownMenu works
how to display item's text(what I want to show),text is long or short .IGLDropDownItem how to auto adjust height?
I try to adding dropdown menu in UIScrollView. this can not be active by touch, only long touch.
And It can not be autolayout in my view.
i've found your lib and added it to my project via cocoapods:
https://cocoapods.org/?q=IGLDrop
unfortunatly there is the storyboard support missing. i've seen you did some change 2 hours ago. when you have finished them, can you please make an update to cocoapods? thanks a lot!
I'd love to be able to change the background color of the button and kill the drop shadow.
How to scroll if drop down list size is more that screen bound
I have a problem when I call reloadView method. After every call, menu button moves up.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.