Easier NSLayoutConstraint interactions
In Swift 4 UILayoutPriority has become a struct, with an initializer and a rawValue, instead of being a rawValue of Float itself. This means that simple assignments became slightly harder:
let constraint = someView.leadingAnchor.constraint(equalTo: otherView.leadingAnchor)
// Swift < 4
constraint.priority = 999
// Swift 4
constraint.priority = UILayoutPriority(rawValue: 999)Besides this, I've always had a pet peeve – activating constraints that require priority manipulation:
NSLayoutConstraint.activate([
someView.leadingAnchor.constraint(equalTo: otherView.leadingAnchor),
someView.trailingAnchor.constraint(equalTo: otherView.trailingAnchor)
])