Closed kerimovscreations closed 7 years ago
I tried this method in an empty view controller, it worked. But I need this drop down in a container view, it doesn't work inside container view.
If the drop down content exceeds from container view height, it doesn't respond on select row delegate.
Can you share your project or a POC code so that I can investigate the way in which you are implementing it?
I'm trying to make such a view. In the right side, I add drop down menu. In a result, if menu content exceeds the height of container view, table view doesn't respond to did select row delegate.
Is your Search Filters Fragment View Controller occupying fullscreen? It is hard to judge the final output you are trying to achieve from this. By default, menu occupies the height of its parent view when added to the view controller. But there is an option to pass custom height for the menu based on where you are adding it. That should solve your problem.
Search Filters Fragment View Controller doesn't occupy full screen, it has fixed 80 height. The menu is shown in full screen, I agree. But if its content becomes more than 80, it doesn't respond to select row delegate. I can create a simple one-page project and give this example.
Sample Drop Down.zip Here you can look through my case
This is kind of odd UI Implementation. Can you share a UI design [shared by your designer] that you are trying to achieve? A View cannot get touch events outside the bounds of its parent view which you are trying to achieve here. You can instead add a menu in the same area where you have container view above the scroll view in the same view controller. I don't see a need for separate container view over there. This is not specific to the drop-down menu but an issue related to UI Implementation.
I am closing this issue as this is not a drop-down related issue. It is a basic iOS concept where a touch event cannot be received outside the bounds of its container/parent view.
I need to implement Android style - Spinner, to select the filters and search with these filters. I'm also experienced in Android and expected the same functionality from this library. The menu has shadow below itself, and I guessed it has placed over the container view - like alert style view.
It is not built the way spinner behaves. You can search for custom PickerView which can give you similar experience as Android's spinner
I'm using this library with 3 columns, but can't catch did select row delegate. func didSelectRow(at indexPath: JNIndexPath, for forMenu: JNDropDownMenu) { print("selected some") var str = "" switch indexPath.column { case 0: str = cousins[indexPath.row] break case 1: str = categories[indexPath.row] break case 2: str = regions[indexPath.row] break default: str = "" } print(str + " selected") }