wyu
wyu

Reputation: 1813

Storyboard assistant editor for a ViewController opens <projectName>-Swift.h instead of <viewController>.swift

I have a programmatic swift project that I'm converting to Storyboards. A particular interaction is grinding my gears.

When I click on a view controller MyViewController in a storyboard, the assistant editor opens up myProjectName-swift.h instead MyViewController.swift

I know I can click on the nav bar of the assistant editor and select my VC from the automatic drop down list but this is just adding more actions every time I switch VCs in storyboard.

Upvotes: 4

Views: 2224

Answers (2)

wyu
wyu

Reputation: 1813

That -Swift.h file was generated by swift 2.2 and lives in the derived data folder.

After clearing derived data the problem seems to have resolved itself

Upvotes: 0

Idan
Idan

Reputation: 5450

When you set you class to match your view controller, usually the assistant editor will open the right file.

This is how to select the class:

  • Select your view controller in storyboard
  • Open the identity inspector
  • Select the class from the list

    identity inspector

Upvotes: 4

Related Questions