@@ -14,9 +14,15 @@ class TabCollectionViewCell: UICollectionViewCell {
1414
1515 let textLabel = UILabel ( )
1616 let closeButton = UIButton ( )
17+ let separatorView = UIView ( )
1718
1819 var separatorViewWidthConstraint : NSLayoutConstraint !
1920
21+ var isLastItem : Bool {
22+ get { return separatorView. isHidden }
23+ set { separatorView. isHidden = newValue }
24+ }
25+
2026 override init ( frame: CGRect ) {
2127 super. init ( frame: frame)
2228
@@ -37,15 +43,14 @@ class TabCollectionViewCell: UICollectionViewCell {
3743 closeButton. alpha = 0.5
3844 contentView. addSubview ( closeButton)
3945
40- let separatorView = UIView ( )
4146 separatorView. translatesAutoresizingMaskIntoConstraints = false
4247 separatorView. backgroundColor = UIColor ( white: 85 / 255 , alpha: 0.4 )
4348 contentView. addSubview ( separatorView)
4449
4550 contentView. addCompactConstraints ( [
4651 " textLabel.centerY = contentView.centerY " ,
4752 " textLabel.left = contentView.left + 6 " ,
48- " closeButton.width = 24 " ,
53+ " closeButton.width = 30 " ,
4954 " closeButton.height = contentView.height " ,
5055 " closeButton.left = textLabel.right " ,
5156 " closeButton.right = contentView.right " ,
0 commit comments