Skip to content

Instantly share code, notes, and snippets.

@dfelber
Created September 5, 2016 15:29
Show Gist options
  • Save dfelber/9f1a46852e5cda612b4318c323521567 to your computer and use it in GitHub Desktop.
Save dfelber/9f1a46852e5cda612b4318c323521567 to your computer and use it in GitHub Desktop.
Initializer for UIEdgeInsets with one value for top, bottom, left and right
extension UIEdgeInsets {
init(inset: CGFloat) {
self.top = inset
self.bottom = inset
self.left = inset
self.right = inset
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment