All my code here, tnx to help me. When I write my code like that circle image in toolbar padding bottom. I want to fixed image in toolbar.
struct NatureView: View {
@State var search = ""
var borderColor: Color = Color("color")
var body: some View {
NavigationView() {
VStack(alignment: .leading, spacing:0){
HStack(spacing: 0){
Spacer()
TextField("Search", text: $search)
.padding(.vertical,5)
.padding(.horizontal)
.background(Color.gray.opacity(0.090))
.cornerRadius(30)
.frame(width: 330, height: 32)
Spacer()
NavigationLink(LocalizedStringKey, destination:SettingsView())
Image("image")
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 32, height: 32)
.clipShape(Circle())
.overlay(Circle().stroke(Color("color"), lineWidth: 1))
}
Spacer()
}
VStack {
Spacer()
Button(action: {}) {
Image("image-white")
.padding()
.background(Color("color"))
.foregroundColor(Color.white)
.clipShape(Circle())
.frame(width: 40, height: 40)
.shadow(color: Color("color"), radius: 1, x: 0.0 , y: 0.0)
}
}
.frame(maxWidth: .infinity, alignment: .trailing)
.padding()
}
}
}
}