WestCoastProjects
WestCoastProjects

Reputation: 63062

Xcode will not open the ViewController.swift source files

I am in the Xcode editor. I can view the Main.storyboard or edit most of the source files. But for some reason the [*]ViewController.swift files will not display in the Editor section. What is going on?

The screenshot below shows that after hitting "enter" on the SecondViewController.swift instead of opening it in the editor the experiments.js remains. The same thing happens for SecondViewController.swift. However other .swift files do open properly.

I had edited those *Controller files in the past so this is bizarre. Any tips?

enter image description here

Upvotes: 0

Views: 54

Answers (1)

Warren Burton
Warren Burton

Reputation: 17382

Observe how the icons are dimmed in the two ViewController files compared to experiments.swift

This usually means that the files are not where Xcode thinks they are. Check the path in the Document inspector and if needed use the widget in the inspector to correct the path or you can add the files again from their current location.

Maybe you moved the files outside of Xcode during organising or refactoring to cause this.

Upvotes: 2

Related Questions