Created
December 29, 2019 18:08
-
-
Save jeffypooo/2d95a36149e66394a4d9bac79bc24454 to your computer and use it in GitHub Desktop.
SwiftUI View Extensions
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
extension View { | |
func horizontalGuide(_ which: HorizontalAlignment, compute: @escaping (ViewDimensions) -> CGFloat) -> some View { | |
return alignmentGuide(which, computeValue: compute) | |
} | |
func verticalGuide(_ which: VerticalAlignment, compute: @escaping (ViewDimensions) -> CGFloat) -> some View { | |
return alignmentGuide(which, computeValue: compute) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment