DidSelectRow delegate not works #7
Comments
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? |
Is your Search Filters Fragment View Controller occupying fullscreen? It is hard to judge the final output you are trying to achieve from this. |
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 |
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. |
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. |
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")
}
The text was updated successfully, but these errors were encountered: