Search code examples
textswiftuilayout

Set fixed size for Text block SwiftUI


I have cell model, and sometimes I have long text in title and cell's size changes. Do you know how to fix text position and align it by first line?enter image description here


Solution

  • It looks like you are wrapping the cells with HStack. Use HStack(alignmeht: .top)