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 View { | |
func flexible(width: Bool, height: Bool) -> some View { | |
self.modifier(MatchingParentModifier(width: width, height: height)) | |
} | |
} | |
struct MatchingParentModifier: ViewModifier { | |
@State private var intrinsicSize: CGSize = UIScreen.main.bounds.size | |
private let intrinsicWidth: Bool | |
private let intrinsicHeight: Bool |
OlderNewer