Skip to content

Instantly share code, notes, and snippets.

@Marcocanc
Created January 26, 2018 12:20
Show Gist options
  • Save Marcocanc/21690775779121e1423518b4548daf17 to your computer and use it in GitHub Desktop.
Save Marcocanc/21690775779121e1423518b4548daf17 to your computer and use it in GitHub Desktop.
UILayoutPriority Offset
extension UILayoutPriority {
/// Returns a UILayoutPriority that offsets an existing one by the specified value.
static func offset(_ prio: UILayoutPriority, by offset: Float) -> UILayoutPriority {
return UILayoutPriority(rawValue: prio.rawValue + offset)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment