Fix truncated message text in some situations

Reduce stack view spacing and allow font to scale down.
Related to iOS-252
This commit is contained in:
shannon 2024-11-07 10:05:37 -05:00
parent 531c1a054e
commit 28f1743ebf
1 changed files with 9 additions and 2 deletions

View File

@ -68,7 +68,7 @@ struct DonationView: View {
var body: some View {
HStack {
Spacer()
VStack(spacing: 30) {
VStack(spacing: 25) {
topMessage
frequencyPicker
amountEntry
@ -81,7 +81,14 @@ struct DonationView: View {
}
@ViewBuilder var topMessage: some View {
Text(campaign.donationMessage)
GeometryReader { geom in
Text(campaign.donationMessage)
.frame(height: geom.size.height)
.allowsTightening(true)
.lineLimit(3)
.scaledToFit()
.minimumScaleFactor(0.7)
}
}
@ViewBuilder var frequencyPicker: some View {