5

Just a trivial kind of question. I've got a small project open which has two scenes, and two corresponding view controllers. They are matched up properly, with each scene having its own view controller which I set in 'custom class' under identity inspector.

When I have the second scene selected, and then click on assistant editor, the assistant editor brings up the view controller for the other scene. Is this a normal tick in Xcode? Can I fix it?

Thanks.

cheznead
  • 2,589
  • 7
  • 29
  • 50

1 Answers1

10

Xcode sometimes behaves like this. I haven't figured how the assistant editor decides what to show, though you can always change it by selecting something else from this list: (top left of the assistant editor, next to the < > buttons)

enter image description here


Credit to vrwim:

When you select any of the automatic options and Xcode doesn't show the correct one, do a build and check the list again. This fixes it most of the time.

Community
  • 1
  • 1
Lord Zsolt
  • 6,492
  • 9
  • 46
  • 76
  • 3
    To build on this, when you select any of the automatic options and Xcode doesn't show the correct one, do a build and check the list again. This fixes it most of the time. – vrwim Mar 24 '15 at 10:51
  • Great, thanks both. I think in hindsight this may have been happening because it was a new view controller and the project didn't recognise it in the same way? Great tip re re building. – cheznead Mar 24 '15 at 11:04