Reputation: 12161
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
Upvotes: 5
Views: 5649
Reputation: 7078
Choose you view and in the Utilities View, in the Identity Inspector tab, In the Class text field, put down your class name.
Save
The relevant class will appear in the assistent editor.
Upvotes: 1
Reputation: 5767
Go into Xcode (v4) Organizer...Choose Projects. Find your project and delete the Derived Data. Then rebuild the project.
Upvotes: 5
Reputation: 8086
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!
Upvotes: 7