iOSDropDown
iOSDropDown copied to clipboard
ArrowColor not working
I am trying to change the color of the arrow from default (black) to white. In the interface builder, I set it to white but it stays black. I set it in code, but it stays black. I even go into the iOSDropDown.swift file and manually set the color to UIColor.white.cgColor but that doesn't do anything either. I have read that apparently the frame needs to be set but the Path has that already. Any thoughts on what is wrong?
Here is the draw code from iOS DropDown with the change:
`
override func draw(_ rect: CGRect) {
// Get size
let size = self.layer.frame.width
// Create path
let bezierPath = UIBezierPath()
// Draw points
let qSize = size/4
bezierPath.move(to: CGPoint(x: 0, y: qSize))
bezierPath.addLine(to: CGPoint(x: size, y: qSize))
bezierPath.addLine(to: CGPoint(x: size/2, y: qSize*3))
bezierPath.addLine(to: CGPoint(x: 0, y: qSize))
bezierPath.close()
// Mask to path
let shapeLayer = CAShapeLayer()
shapeLayer.path = bezierPath.cgPath
shapeLayer.fillColor = UIColor.white.cgColor //arrowColor.cgColor
shapeLayer.strokeColor = UIColor.white.cgColor
if #available(iOS 12.0, *) {
self.layer.addSublayer (shapeLayer)
} else {
self.layer.mask = shapeLayer
}
}`
try Product > Clean Build Folder then start Project again it's work
Have tried cleaning the build folder and then restarting the project, but it did not worked.
Unable to change Arrow colour through Attribute inspecter
update Your pod, issue fixed