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?
To create a Objective-C class, you have to select "Cocoa class". This will create an . h and . m file for you.
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.
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.
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.
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