I have a NavigationStack with a custom ToolbarItem in it like this:
It's working well, but I want to set a specific height for the NavigationBar to make it look better. I don't want to change the .inline
modifier for the .navigationBarTitleDisplayMode
, only to be able to set the height manually.
This is my code so far:
NavigationStack{
List{
Section{
.....
}
}
.listStyle(.plain)
.toolbar {
ToolbarItem(placement:.topBarLeading){
CustomFeedNav()
}
ToolbarItem (placement: .navigationBarTrailing) {
Button{
}label: {
Image(systemName: "arrow.counterclockwise.circle")
}
}
}
}
Unfortunately, I am not sure how to tackle the problem, but I believe it may be related to some UIKit code. Thank you in advance.
Solved my problem by switching from a List to a LazyVStack with a sticky header that functions like a NavigationBar. LazyVStack offers more powerful capabilities compared to List. I highly recommend utilizing it.