Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In xcode -- how to easily switch editor view from 'swift-like' generated representation of header to underlying objective-c header

Xcode has the "helpful feature" (in quotes because its not helpful to me) of generating a swift-syntax representation of objective-c headers.

When using shortcuts to open a .h file (cmd-shift-o then type Foo.h) -- sometimes you are taken to the swift representation of Foo.h and sometimes to the objective-c representation.

The vast majority of the time, I want the objective-c representation -- is there a way to quickly switch to it with keyboard shortcuts when Xcode dumps you in the swift version?

like image 879
Ben Avatar asked Jun 01 '16 19:06

Ben


1 Answers

As of Xcode 9 (possibly before), you can select the "counterpart" from the four square menu. One is labeled as the swift representation, one is the ObjC representation.

enter image description here

like image 83
Chase Holland Avatar answered Sep 30 '22 02:09

Chase Holland