Skip to content

Commit e7990d3

Browse files
committed
Simplify the UILayoutPriority conversion
1 parent ca25267 commit e7990d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/TokenField/ICTokenField.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ open class ICTokenField: UIView, UITextFieldDelegate, ICBackspaceTextFieldDelega
114114
if placeholderLabel.superview != nil { return }
115115
insertSubview(placeholderLabel, belowSubview: scrollView)
116116
placeholderLabel.translatesAutoresizingMaskIntoConstraints = false
117-
placeholderLabel.setContentHuggingPriority(UILayoutPriority(rawValue: UILayoutPriority.RawValue(Int(UILayoutPriority.defaultLow.rawValue) - 1)), for: .horizontal)
117+
placeholderLabel.setContentHuggingPriority(UILayoutPriority(rawValue: UILayoutPriority.defaultLow.rawValue - 1), for: .horizontal)
118118
addConstraint(NSLayoutConstraint(item: placeholderLabel, attribute: .leading, relatedBy: .equal, toItem: scrollView, attribute: .leading, multiplier: 1, constant: 0))
119119
addConstraint(NSLayoutConstraint(item: placeholderLabel, attribute: .trailing, relatedBy: .greaterThanOrEqual, toItem: scrollView, attribute: .trailing, multiplier: 1, constant: 10))
120120
addConstraint(NSLayoutConstraint(item: placeholderLabel, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1, constant: 0))

0 commit comments

Comments
 (0)