I want to move up the two icons (refresh and settings) to the same line as the navigationBarTitle
:
Here is my view:
struct Games: View {
let diameter: CGFloat = 35.0
var body: some View {
NavigationView {
VStack {
// Create game
HStack {
Image(systemName: "house.fill")
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 40, height: 40)
.foregroundColor(.blue)
Spacer()
Button(action: {
}){
Image(systemName: "arrow.clockwise")
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 40, height: 40)
.foregroundColor(.gray)
.padding(.horizontal, 30)
}
NavigationLink(destination: Settings()){
Image("settings")
.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 40, height: 40)
.foregroundColor(.gray)
}
}
HStack{
Spacer()
Button(action: { }){
Text("+ Create game")
.font(.custom("Seravek-Medium", size: 22))
.padding(15)
.background(
RoundedRectangle(cornerRadius: 5)
.fill(Color.blue.opacity(0.1))
)
}
}
.frame(
maxWidth: .infinity,
maxHeight: 80,
alignment: .bottom
)
} // VStack
.navigationTitle("Games").foregroundColor(.blue)
.padding(25)
} // NavigationView
}
}
but it appears that the navigationBarTitle takes up the full width.
Is there any way I can get around this?