Skip to content
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

Full width Seperator line #300

Open
mc-lctoan opened this issue Dec 9, 2021 · 2 comments
Open

Full width Seperator line #300

mc-lctoan opened this issue Dec 9, 2021 · 2 comments

Comments

@mc-lctoan
Copy link

IMG_0074

I want to add a separator line between the items. but a part of the line is hidden.

How can I get the separator line with full width of the dropdown?

@MrPrakashR
Copy link

I able to add full width line with below code:

memberDropDown.customCellConfiguration = { (index: Index, item: String, cell: DropDownCell) -> Void in
let dividerLine = UIView(frame: CGRect(x: 0, y: cell.frame.height - 1, width: self.view.frame.width - 20, height: 0.6))
dividerLine.backgroundColor = UIColor().darkBlueColor
cell.addSubview(dividerLine)
}

@thingineeer
Copy link

I able to add full width line with below code:

memberDropDown.customCellConfiguration = { (index: Index, item: String, cell: DropDownCell) -> Void in let dividerLine = UIView(frame: CGRect(x: 0, y: cell.frame.height - 1, width: self.view.frame.width - 20, height: 0.6)) dividerLine.backgroundColor = UIColor().darkBlueColor cell.addSubview(dividerLine) }

@MrPrakashR

It's a good idea to fine-tune it with customCellConfiguration, but there's a very very good solution, so I'll do a PR.

If you write the code above, an issue will occur where two Separators are visible when you press DropDown twice.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants