I am trying to disable the navigation bar button item (ie. the Edit button on the right of the navigation bar). I’m able to do this by setting self.navigationItem.rightBarButtonItem?.isEnabled = false. However, if I segue to a new view controller and then come back to the original window, the bar button becomes enabled even though it was disabled when I segued to the other screen.
I tried setting the right bar button item to disabled in viewWillAppear() but it still doesn’t work.
Does anyone know why this doesn’t work when you segue back?