Created
June 19, 2022 21:07
-
-
Save hmlongco/b9d4b55dee17600d724add331d42e310 to your computer and use it in GitHub Desktop.
Builder: LabeledPhotoView
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
struct LabeledPhotoView: ViewBuilder { | |
let photo: Observable<UIImage?> | |
let name: String | |
var body: View { | |
ZStackView { | |
ImageView(photo) | |
.contentMode(.scaleAspectFill) | |
.clipsToBounds(true) | |
LabelView(name) | |
.alignment(.right) | |
.font(.title2) | |
.color(.white) | |
.padding(h: 20, v: 8) | |
.backgroundColor(.black) | |
.alpha(0.7) | |
.position(.bottom) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment