The default design of TabView is 90% close to what I want. However, the icons, to my eye, lack a sufficient amount of spacing at the top, and slightly too much white space at the bottom.
Is there a way to give more top padding to the icons? To move the icons down without changing the height of the TabView itself?
Also, I find it weird that .labelStyle(.titleOnly)
works on Tabs but .labelStyle(.iconOnly)
doesn't work. Is that a bug? I had to use Image
instead of Label
:
TabView {
Tab {
MailView()
} label: {
Image(systemName: "envelope")
.padding(20)
}
Tab {
SettingsView()
} label: {
Image(systemName: "gearshape")
.padding(20)
}
}