Add icon to left or right of the cell.#30
Conversation
|
Hello @Tchelow, It is indeed a good idea 👍 struct DropDownChoice: StringLiteralConvertible {
let text: String
let icon: UIImage?
// Basic init method and StringLiteralConvertible init
}
let dropDown = DropDown()
// dataSource is an Array of DropDownChoice's
// can be used like this
dropDown.dataSource = ["simple text", "with", "no icons"]
// or like this
dropDown.dataSource = [
DropDownChoice(text: "text", icon: UIImage(named: "icon_1"),
DropDownChoice(text: "with", icon: UIImage(named: "icon_2"),
DropDownChoice(text: "icons", icon: UIImage(named: "icon_3")
] |
|
Hi Kevin, |
|
Hello @Tchelow, Don't worry, if you don't have time I'll implement it, plus, I'm actually implementing #27 which is gonna change a lot the code (also for the By the way, if you have a screenshot of your app using the |
|
I sent you an email with the screenshot. |
|
is this working in swift 3.0 (master branch) ? |
|
@carlosen14 looks like not |
|
any update on this enhancement? |
This is a suggestion on how we could have a left or right icon along with the title of the cell.
Obviously, instead of using a
public var icon: UIImage?we should add it to thedataSourceand adapt it to handle not only an array of Strings but multiple objects.Feel free to change and adapt it in order to conform with everything else and put it to good use. I'd finish it, but I'm running short on time.
This PR refers to the issue #29.