move to public category

This commit is contained in:
Michael Kirk 2019-04-15 10:18:41 -06:00
parent 349dd61fee
commit fa45339f83
2 changed files with 7 additions and 9 deletions

View File

@ -647,12 +647,3 @@ private class DoneButton: UIView {
delegate?.doneButtonWasTapped(self)
}
}
extension UIView {
func setShadow(radius: CGFloat = 2.0, opacity: CGFloat = 0.66, offset: CGPoint = .zero, color: CGColor = UIColor.black.cgColor) {
layer.shadowColor = UIColor.black.cgColor
layer.shadowRadius = 2.0
layer.shadowOpacity = 0.66
layer.shadowOffset = .zero
}
}

View File

@ -126,6 +126,13 @@ extension UIView {
constraints.append(subview.autoMatch(.height, to: .height, of: self, withMultiplier: 1.0, relation: .lessThanOrEqual))
return constraints
}
func setShadow(radius: CGFloat = 2.0, opacity: CGFloat = 0.66, offset: CGPoint = .zero, color: CGColor = UIColor.black.cgColor) {
layer.shadowColor = UIColor.black.cgColor
layer.shadowRadius = 2.0
layer.shadowOpacity = 0.66
layer.shadowOffset = .zero
}
}
// MARK: -