Skip to content
Discussion options

You must be logged in to vote

Hi @asalinasfetch, thanks for opening the discussion! I think the best way to align dynamically sized views in SwiftUI is to use the frame modifier. This will make sure to left-align the content if it's shorter than the container view.

HFlow {
  ForEach(...)
}
.frame(maxWidth: .infinity, alignment: .leading)

There was a similar question in #5, hope this helps.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@asalinasfetch
Comment options

Answer selected by asalinasfetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants