Skip to content

Posts from the ‘Xcode Tips’ Category

21
Oct

Switch Between Header and Implementation File in Xcode

If you want to switch between header file and implementation file in Xcode, there’s a shortcut for that. Just press:

Ctrl + Cmd + Up Arrow or Down Arrow

15
Oct

Indent Block of Code in XCode

If you want to intend a block of code (selected code) in XCode to the left or to the right use the following shortcut:

Cmd + [ to indent to the left
Cmd + ] to indent to the right

17
Feb

Rename a Variable in XCode

You can easily rename a variable in XCode by selecting the variable and then right clicking on the variable and then choose: Refactor -> Rename, or by going to XCode’s Edit menu:

Edit -> Refactor -> Rename.

Fill in the new name, and then XCode will show you the code with new variable name (press Preview). Press Save to change every appearance of the old variable name with new name.

11
Dec

Shortcut to Stop Execution of a Program From XCode

To stop execution of a program from XCode we can use the following shortcut:

Command + .

10
Dec

Get contextual help in XCode about

If you want to see XCode documentation for a particular Object/Method you can get a contextual help by do a search right from your source code by holding Alt (option) key and double click on the word from the source code we want to search for.

If you want to get a quick help on a word from your source code window hold Alt (option) key and click on that word.