hassan-aftab / hadropdown Goto Github PK
View Code? Open in Web Editor NEWiOS Control for Drop Down Menu
License: Other
iOS Control for Drop Down Menu
License: Other
I changed the type of label from UILabel to UITextField in order to suggest items. But when the keyboard appears, the table view stays under the keyboard.
Any suggestion?
Hi, this is a great iOS control. Thanks for making it.
However, whatever the array size, the last cell can only be selected if I touch at the very top of the cell. Anyway to fix this?
So one of my team member was working on a macbook and the dropdown is working perfectly fine there. But when I ran the same project in the exact same configuration (iOS 11.2, Xcode version 9.4, swift 4) on mac mini, the dropdown items are simply not clickable. We also have a uibutton behind dropdown items which gets clicked if we click that particular dropdown over that button. It acts as if the dropdown items are gone behind the safe area. I think there is an issue with the library because my code is working fine on laptop.
Hi, you cannot select the last menu option due to the method below that adds a view footer that overlaps the last item.
To remove this method or comments it works normally the selection of options.
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { return UIView() }
Main.storyboard: error: IB Designables: Failed to render and update auto layout status for MainVC (O7s-dL-JBg): The agent crashed
Main.storyboard: error: IB Designables: Failed to update auto layout status: The agent crashed
swift 3, xcode 8.3.3 (8E3004b)
Please, add support of CocoaPods
solution:
HADropDown
var defaultLabel: String = String()
override func layoutSubviews() {
...
self.defaultLabel = label.text!
...
}
func deselectCell() {
selectedIndex = -1
label.text = self.defaultLabel
}
now just call
self.dropdown.deselectCell()
and selected cell will deselect and dropdown will show again the title/selection text
If I navigate to another controller, from the controller in which HADropDown is used it does not get removed. May be this is because of adding it on window. Even dropDown.removeFromSuperview() does n't work. Help me in the same.
Thanks in advance.
To delegate work it is necessary to add the viewDidLoad the assignment down.
dropDown.delegate = self
Please help in resolving this issue
add the following func in HADropDown:
func flash() {
self.table.flashScrollIndicators()
}
add the following delegate in your class:
func didShow(dropDown: HADropDown) {
self.dropdown.flash()
}
when user scroll the screen the list of items still in the old place
which it appears on the first time
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.