0

In Xcode 9.2, I've set up a simple test app with two View controllers in a Navigation Controller. The first view, Home, has a navbar button ("Next") that has a "show" segue to the Away view. The Away view has a back button in the navbar to return to the first view. That all works as expected.

The problem is that after returning to the Home view, the "Next" button is grayed out. It's still active and works, just grayed out.

Screenshot of the simulator showing the nav button "Next" is grayed out after clicking the "Away" view's back button to return to the "Home" view

enter image description here

Changing the orientation of the simulator restores the button's color, but only until the segue is used again.

I'm new to Xcode so may have made a beginner's mistake somewhere. The second view is a duplicate of the first. I've added no code to the only ViewController file.

How can I get rid of this graying-out, or is it a bug in Xcode? Thank you.

I found a similar post about this, without reply, on the Apple Dev forums: https://forums.developer.apple.com/thread/94464

Riajur Rahman
  • 1,976
  • 19
  • 28
  • where is the .swift for second viewcontroller ins storyboard – Vinodh Feb 13 '18 at 06:49
  • are you changing navigation controllers tintColor anywhere in code in second view? – Van Feb 13 '18 at 06:52
  • Okay, Ive added an AwayViewController.swift file for the second view controller and connected it in the identity inspector. It doesn't solve the issue, though. Edit: And updated the segue to it. – Nick Ramsay Feb 13 '18 at 07:05
  • I'm not changing the tintColor anywhere. I've not added any code to the controllers at all. – Nick Ramsay Feb 13 '18 at 07:07
  • 1
    @the4kman Ah! Yes, that's exactly it, and the suggested workaround fixes it. Thank you. – Nick Ramsay Feb 13 '18 at 09:37

0 Answers0