ElaWorkshop / TagListView

Simple and highly customizable iOS tag list view, in Swift.
MIT License
2.64k stars 492 forks source link

How to set the border color to special TagView #202

Open mob-rockstar opened 5 years ago

mob-rockstar commented 5 years ago

I tried to set the border color as followings: tagList.addTag("Test").borderColor = UIColor.clear but it causes error : "Ambiguous use of 'borderColor'"

It worked well in previous version but not working now in xcode 10. How can I solve this issue.

prithiviraj9988 commented 5 years ago

I'm also facing same issue in xcode 10, kindly help us to resolve the issue.

naveen114 commented 5 years ago

Can anyone help me with the same issue in Xcode 10

kaiserabliz commented 5 years ago

Change this property (borderColor) name into something different, compiler confuses because majority of UIKit elements have borderColor property as well. Hope it helps.

elprl commented 5 years ago

I would recommend the following terminology for changes to this library : @IBInspectable open var normal... @IBInspectable open var selected... @IBInspectable open var highlighted...

My temp workaround was to use KVC: tagView.setValue(myColor, forKey: "borderColor")

yojkim commented 5 years ago

Is this issue resolved?

felipewilke1 commented 2 years ago

create an extension of TagView and create your own method to set border color:

extension TagView {
    func setBorderColor(_ color: UIColor) {
        setValue(color, forKey: "borderColor")
    }
}