If I create .cpp file from xcode, it will create .h file for me automatically, and I will be able to view two files together in Assistant Editor. It will show .h file relate to .cpp file right next to each other.
However, I create my project from TextMate and import those files manually. Now, when I click .h file it won't show the related cpp file right next to it. How can I make that happen.
Thanks
The Assistant Editor is harder to find as of Xcode 11 even though it is incredibly useful. Press Control + Option + Command + Return to show the Assistant Editor on the right.
You can open the editor from the Xcode menu Editor -> Assisant . Nowadays, the Assistant Editor is more seen as just a second editor next to the primary editor.
Press the Alt key and the file will open in the Assistant Editor Window.
You can open the 'Assistant Editor' in Xcode by clicking the button with two circles in the top right, or via View > Assistant Editor > Show Assistant Editor.
Hmmm.. I tried to recreate your problem, but it worked for me.
I have two thoughts:
1) Are you sure they are named the same thing? If not, it doesn't seem to consider them counterparts. 2) When you've switched to the Assistant Editor, to the right of the back/forward buttons is a dropdown menu to select which file to display. This should be set to "Counterparts" in order to get it to auto-display the correct counterpart.
If you have this set to manual, you can set it to maintain a certain file on the side.
Hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With