Last active
March 25, 2020 20:08
-
-
Save jpmcglone/5d442263bf969e2ed490acf0fce77d42 to your computer and use it in GitHub Desktop.
This file contains 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
import SwiftUI | |
public extension Spacer { | |
static func exactly(_ value: CGFloat) -> some View { | |
Spacer() | |
.frame( | |
minWidth: value, | |
idealWidth: value, | |
maxWidth: value, | |
minHeight: value, | |
idealHeight: value, | |
maxHeight: value | |
) | |
} | |
static func idealOrLess(_ value: CGFloat) -> some View { | |
Spacer() | |
.frame( | |
idealWidth: value, | |
maxWidth: value, | |
idealHeight: value, | |
maxHeight: value | |
) | |
} | |
static func idealOrMore(_ value: CGFloat) -> some View { | |
Spacer() | |
.frame( | |
minWidth: value, | |
idealWidth: value, | |
minHeight: value, | |
idealHeight: value | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment