title: How to create dropdown with icon and custom text colors in swift?
body: <p>I want to use dropdown within tableview cell and I was trying to use AssistoLab / (<a href="https://github.com/AssistoLab/DropDown" rel="nofollow noreferrer">https://github.com/AssistoLab/DropDown</a>)DropDown library but the problem is I have to give different colors for the dropdown menu option text. As of my R &amp; D it's not possible with AssistoLab/DropDown. If anybody has some idea plz help me out.</p>
  <pre><code>import UIKit
  import DropDown
  
  
  
  class AddWorkoutCategoryTableViewCell: UITableViewCell {
  
      
      @IBOutlet weak var dropDownView: UIView?
      
      
      let dropDown = DropDown()
      
      override func awakeFromNib() {
          super.awakeFromNib()
          // Initialization code
      }
  
      override func setSelected(_ selected: Bool, animated: Bool) {
          super.setSelected(selected, animated: animated)
  
          // Configure the view for the selected state
      }
      
      
      func configureGenderDropDown() {
          let blackColor = UIColor.black // 1.0 alpha
          let defaultDropDownBackgroundColor = blackColor.withAlphaComponent(0.7) // 0.8 alpha
          DropDown.appearance().textColor = UIColor.white
          dropDown.anchorView = dropDownView
          DropDown.appearance().selectedTextColor = UIColor.red
          DropDown.appearance().textFont = UIFont.systemFont(ofSize: 15)
          DropDown.appearance().backgroundColor = defaultDropDownBackgroundColor
          DropDown.appearance().selectionBackgroundColor = UIColor.black
          DropDown.appearance().cellHeight = 40
          dropDown.selectRow(at: 3)
          
          dropDown.dataSource = [&quot;Sendworkout&quot;, &quot;Edit Workout&quot;, &quot;Duplicate workout&quot;, &quot;Delete workout&quot;]
      }
  
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/RDlwl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RDlwl.png" alt="enter image description here" /></a></p>