Questions tagged [navigationbaritems]

20 questions
0
votes
1 answer

Xcode SwiftUI leading navigationBarItem not working but trailing navigationBarItem does work

I'm a new Xcode/SwiftUI programmer, and I've encountered a problem in my ThirdView code (below) whereby the exact same button code works as expected as a trailing navigationBarItem but does not appear at all when I move the button and associated…
ej5607
  • 309
  • 2
  • 12
0
votes
1 answer

Display cancel button when the VC is presented, don't display cancel button when the same VC is pushed

I have a ViewController that need to display in two places. In first place, the VC need to present and dismiss using a cancel button in its navigation bar. In second place, the VC need to push to a navigation stack(its presented modally too) and…
nmy
  • 488
  • 8
  • 21
0
votes
0 answers

SwiftUI: navigationBarItems missing on first render

I'm seeing a strange issue that I was able to reproduce with a small sample. If you have a detail view that has navigationBarItems set, and that detail is the second view pushed on a navigation stack, the items do not show up when you get to the…
NewShelbyWoo
  • 722
  • 1
  • 7
  • 21
0
votes
1 answer

How do I change navigationBarItem color

I want to be able to set custom colors for the NavBar and the navigationBarItems in SwiftUI. Here is the code for the navigationBarItems: .navigationBarItems(leading: EditButton(), trailing: Button(action: { self.showingAddScreen.toggle() })…
forrest
  • 10,570
  • 25
  • 70
  • 132
-1
votes
1 answer

SwiftUI Navigation Bar Items - replace EditButton() with SF Symbol

When I run this code, I can't EDIT the LIST which doesn't display the DELETE and MOVE UI when the user taps Edit. My original code with the TEXT works. Apple EditButton docs - a button that toggles the edit mode environment value. [Apples docs…
1
2