Skip to content

Working out how to remove the vertical spacing between columns in a LazyVGrid in SwiftUI.

Notifications You must be signed in to change notification settings

danielctull-playground/SwiftUI-LazyVGrid-Spacing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI LazyVGrid Spacing

Before

I was having the issue that there is a vertical space in the LazyVGrid in SwiftUI. It turns out there's a extra parameter I was missing in GridItem's initialiser for spacing. So using GridItem(.flexible(), spacing: 0) removes the vertical spacing between the columns as shown below.

After

About

Working out how to remove the vertical spacing between columns in a LazyVGrid in SwiftUI.

Resources

Stars

Watchers

Forks

Languages