@darkpaw Thanks for feedback, basically I want to separate my bottom toolbar with bottom sheet function(like describe in the 1st image) , but when I applied .toolbar{} with .sheet() function the result came like 2nd image.
The bottom sheet come in front of toolbar button icons.
Here is my code:
var body: some View {
NavigationView{
ZStack() {
.toolbar {
**# MY BOTTOM TOOL BAR IS HERE **
ToolbarItem(placement:.bottomBar)
{
HStack(spacing:11){
Button{}label: {
VStack
{
Image(icon: .home_g)
.renderingMode(.template)
.resizable()
.frame(width: 30, height: 30)
Text("Home")
}
.frame(width: 65, height: 65)
.cornerRadius(25)
} } }
GeometryReader{
geo in
MapView(mapType: .standard,showsUserLocation: true)
**#
# MY BOTTOM SHEET IS HERE **
.sheet(isPresented: $shopListVM.showSheet) {
ZStack{
if #available(iOS 16, *) {
VStack{
Text("SHEET IS OPEN")
}
.presentationDetents([.medium, .fraction(0.1)])
}
else {
VStack{
Text("SHEET IS OPEN")
}
}
}
}
VStack(spacing:20){
VStack{
HStack{
Image(systemName: "magnifyingglass")
TextField("Search..",text: $searchText)
}
.padding()
.background(Color.white)
.cornerRadius(20)
.padding(.top,30)
.padding(.horizontal,30)
}
}
}
}
.accentColor(Color(hex: 0xFA6109))
}
}
}
Post
Replies
Boosts
Views
Activity
can you solved 2nd image design code in swiftui? if it done, kindly share the design code I am stuck on it,how to display bottom sheet behind my Bottom toolbar items.
(https://developer.apple.com/forums/thread/719893)