Post

Replies

Boosts

Views

Activity

Reply to Unable to Display Text Fully in Text() SwiftUI
Yea I tried setting the frame height for the Text and it doesn't change it... Apologies in advance for not so good code (should probably used case) Here is the swift code block @ViewBuilder var answer: some View { VStack { Spacer() if viewModel.result_string == "lessthantwo" { FormattedAnswerView(text: "Invalid Input") } else if viewModel.result_string == "cannotRecogniseCharacter" { FormattedAnswerView(text: "Are you sure that is IPA?") } else { Text(viewModel.result_string) .font(.title) .fontWeight(.semibold) .padding() } Spacer() Button(action: { if !viewModel.result_string.isEmpty { UIPasteboard.general.string = viewModel.result_string } }) { Label("Copy", systemImage: "square.on.square") .fontWeight(.semibold) .foregroundStyle(Color("themeColor")) .padding() } } } Happy to provide more code and context if it helps to find a solution!
Jul ’24