Multi-Line Localizable String In SwiftUI

167 Views Asked by At

I need a key/value pair in my Swift Localizable file to by multi line but nothing seems to be working. This is what I've tried:

"someKey" = "Line 1 \n Line 2";

Text(someKey)
    .lineLimit(2)

The result is one line like this: Line 1...

1

There are 1 best solutions below

0
Paniti Marta On

Maybe the container of the Text view is too narrow. Please provide more info. Try: .frame(maxWidth: .infinity, alignment: .leading)