ElaWorkshop / TagListView

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

Elipsized text in tags with iOS 13 (Beta 1) #225

Open blackivory86 opened 5 years ago

blackivory86 commented 5 years ago

Some (not all!) of the tags in our app are elipsized with ... in the middle of the text because the are not fitting the size of the TagView.

The problem appears with iOS 13 (simulator and device) Beta 1.

2NU71AN9 commented 5 years ago

我也遇到了同样的问题 iOS13 beta2

thantthet commented 5 years ago

Replacing titleLabel?.text?.size... with super.intrinsicContentSize in TagView fixed that issue.

    override open var intrinsicContentSize: CGSize {
        var size = super.intrinsicContentSize
        size.height = textFont.pointSize + paddingY * 2
        size.width += paddingX * 2
        if size.width < size.height {
            size.width = size.height
        }
        if enableRemoveButton {
            size.width += removeButtonIconSize + paddingX
        }
        return size
    }
pravintate commented 5 years ago

I'm facing same issue in my code, but my collectionViewCell is not visible in iOS13, can any one help me in this. I have tried same but it not working.