ElaWorkshop / TagListView

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

TagView to respect frame width #218

Open and0m opened 5 years ago

and0m commented 5 years ago

I was wondering if it is possible to have a fixed width for all tags?

I tried the following code but it doesn't seem that tagView respects the frame.size.width. Is this something that is possible to do, without having to create a custom tag view? I like working with the IBInspectable feature.

for str in strings {
     let tagView = topHolder.addTag(str)
     tagView.frame.size.width = 100
     tagView.isSelected = false
     if str == "2"{
        tagView.isEnabled = false
     }
}

I also tried to set intrinsicContentSize but that didn't work for obvious reasons.

hardikamal commented 5 years ago

@and0m Any solution found?

TayyabAli652 commented 4 years ago

Any solution found?

kiras0518 commented 4 years ago

Any solution found? how did set height?