Reputation: 39
struct DouaView: View {
@State var duas: English
var body: some View {
VStack{
List {
ForEach(duas.text ,id:\.id){ dua in
VStack(alignment: .trailing, spacing: 0) {
HStack(alignment: .top){
Text(dua.arabicText!)
.font(.custom("me_quran_volt_newmet.ttf", size: 24))
.multilineTextAlignment(.trailing)
.lineLimit(nil)
.padding()
}
.layoutPriority(1)
}.foregroundColor(.white)
.font(Font.system(.headline, design: .rounded))
.padding([.top, .bottom], 20)
}.listRowInsets(EdgeInsets())
.listRowBackground(Color("ColorGreen1"))
}
}.navigationBarTitle("\(duas.title)", displayMode: .inline)
.navigationViewStyle(StackNavigationViewStyle())
.modifier(CustomMudifier())
}
}
I have a problem with long text, I tried a lot of things but still the same missing the text is compressed. can someone help
Upvotes: 1
Views: 284
Reputation: 978
Make lineLimit(nil)
to some large number like lineLimit(250)
If still not working add this modifier after padding
.fixedSize(horizontal: false, vertical: true)
Upvotes: 1