Created
September 14, 2022 22:07
-
-
Save VB10/8c6a0a3afcb2f10cda37bbbee448dbe4 to your computer and use it in GitHub Desktop.
Edge instets with copywith
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension EdgeInsets { | |
func copyWith(top: CGFloat? = nil, leading: CGFloat? = nil, bottom: CGFloat? = nil, trailing: CGFloat? = nil) -> EdgeInsets { | |
return EdgeInsets.init(top: top ?? self.top, leading: leading ?? self.leading, bottom: bottom ?? self.bottom, trailing: trailing ?? self.trailing) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment