Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to toggle between .h and .m in Xcode 4

Just installed Xcode 4 so far so good, except that Apple changed all the keyboard shortcuts! Anyone know how to toggle between .h and .m?

like image 570
Ali Avatar asked Mar 17 '11 02:03

Ali


People also ask

How do I create a .h and M file in Xcode?

To create a Objective-C class, you have to select "Cocoa class". This will create an . h and . m file for you.

How do I open a header file in Xcode?

Holding the Command key, click the import/include statement to view the header. Also, you can Command-click on a symbol to jump to the header file that defines it. Alternatively, you can select the pull down menu at the far left of the jump bar, and go down to the "includes" submenu and select the header file to view.


2 Answers

Apple changed all sorts of shortcuts, but to switch between header and implementation, the new shortcut is,

+ + /

You can change it back to the previous + + / in Preferences > Key Bindings.

Look for the Jump to Next Counterpart and Jump to Previous Counterpart commands.

If you are working on a big screen, you could use the Assistant layout's split view, and have the .h and .m files side by side.

like image 79
Anurag Avatar answered Sep 18 '22 05:09

Anurag


Hither be the Grand Unified Gigantic Sheet of Xcode 4 Keybindings.

Download it. Preview it. Print it. Read it. Know it. Use it. Be it. 
like image 40
bbum Avatar answered Sep 18 '22 05:09

bbum