-
Notifications
You must be signed in to change notification settings - Fork 629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the DropDown height #225
Comments
i am facing same issue .please suggest a solution |
I was having the same problem. Cleaning the build folder and then compiling solved it |
Since the drop down height is set according to the height of cell multiplied by the number of cells. You can try changing the height of the cells dynamically by doing the following: in the DropDown.swift file add the following function
Now, just call this function after intializing dropDown instance. Example:
OR, if you want to dynamically change the height of a particular cell you can do this:
|
In pod file DropDown.swift do following changes for custom height Step 1 : Add this below width property
Step 2 : In public override func updateConstraints() do this
Step 3 : In fileprivate func computeLayoutForTopDisplay(window: UIWindow) -> ComputeLayoutTuple do this
Uses
If height is not set, the dropdown height will be its content size and it will stop at view bounds and dropdown's scroll is activated. |
|
I am using Swift 4.2
How can I change the DropDown height here?
I have tried this: #34 (comment)
But those answers just makes my app crashes.
The text was updated successfully, but these errors were encountered: