Skip to content

Commit 2602d38

Browse files
committed
Fix card dimensions
Signed-off-by: Peter Friese <[email protected]>
1 parent 7f79b7b commit 2602d38

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Features/Hero/CardView.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ struct CardView<Hero: View, Title: View, Details: View>: View {
6767
dismissButton
6868
heroTitle()
6969
}
70-
.frame(height: 450)
7170
.clipShape(
7271
UnevenRoundedRectangle(
7372
cornerRadii: .init(

Examples/FriendlyFlix/app/FriendlyFlix/FriendlyFlix/Features/List/MovieCardView.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,18 @@ struct MovieCardView: View {
2828
if let image = phase.image {
2929
image
3030
.resizable()
31-
.aspectRatio(contentMode: .fill)
32-
.frame(height: 450)
31+
.scaledToFit()
32+
.frame(maxWidth: .infinity)
33+
.clipped()
3334
} else if phase.error != nil {
3435
Color.red
3536
.redacted(if: true)
3637
} else {
3738
Image(systemName: "photo.artframe")
3839
.resizable()
39-
.aspectRatio(contentMode: .fit)
40-
.frame(height: 450)
40+
.scaledToFit()
41+
.frame(maxWidth: .infinity)
42+
.clipped()
4143
.redacted(reason: .placeholder)
4244
}
4345
}

0 commit comments

Comments
 (0)