chirag05k / Xcode-Shortcuts

Welcome 😊, Visual Xcode shortcuts which will help to speed up your development πŸš€. #iOS #Swift #Xcode #Shortcut

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Xcode-Shortcuts

Twitter    Donate



1. Add Documentation To Your Code
      - Put cursor on name or method and press

(Cmd + Option + /) ************************* (⌘ + βŒ₯ + /)

Tip1

2. Quick Open
      - This shortcut will bring up the Open Quickly text box. You can use the text box to search by filename, method name, class name, etc. Just hit ↩ on the desired result to open its respective file on the currently active editor.

(Shift + Cmd + o) ************************* (⇧ + ⌘ + o)

Tip2

3. Opening a file manually in the assistant editor
      - First search for your file using (Shift + Cmd + O) and In order to open a destination file in the secondary editor with the same Assistance editor you can do it using this shortcut.

(Option + Enter) ************************* (βŒ₯ + ↩)

Tip22

4. Opening a file with selected editor
      - First search for your file using (Shift + Cmd + O) and In order to open a destination file in the secondary editor with the diffrent direction Assistance editor you can do it using this shortcut.

(Shift + Option + Enter) ************************* (⇧ + βŒ₯ + ↩)

Tip43

5. Generate memberwise initializer
      - Xcode has a lesser-known refactoring feature that generates an initialization code for you: Use (βŒ₯ + ⌘ + Click) on a class or struct > Generate Memberwise Initializer.

(Option + Cmd + Click) ************************* (βŒ₯ +  ⌘ + Click)

Tip34

6. Fix next issue
      - Sometimes hard to manually find the issue in the Xcode. We can simply jump to the actual error and once we jump to the error again use this command to show the error in detail.

(Ctl + Cmd + ') ************************* (βŒƒ + ⌘ + ')

Tip19

7. Edit / Refactor All In Scope
      - Refactoring is inevitable. That makes editing variables and methods in the scope a crucial tool. The following shortcut lets us edit all in scope together at the same time.

(Ctrl + Cmd + E) ************************* (βŒƒ + ⌘ + E)

Tip9

8. Multiline Cursor
      - It has happened that sometimes you need to write the same thing in different parts of the file and you are annoyed at the fact that you have to write it once and using old pattern (copy-paste) it a couple of times. Well, fret no more. You can write on multiple lines at once with this simple shortcut

(Shift + Ctrl + Click) ************************* (⇧ + βŒƒ + Click)

Tip37

9. Find call hierarchy
      - This shortcut will open the Call Hierarchy view to show any places in your code that call the specified method, as well as any methods that call those methods in turn, and so on.

(Shift + Ctl + Cmd + H) ************************* (⇧ + βŒƒ + ⌘ + H)

Tip32

10. Find Selected Symbol in Workspace
      - Xcode displays the declaration of the symbol in the Find navigator, along with any places where your code references the symbol.

(Shift + Ctl + Cmd + F) ************************* (⇧ + βŒƒ + ⌘ + F)

Tip33

11. Re-Indent Code
      - The simple way to format your code. For the single line OR Multiple lines.

(Ctrl + I) ************************* (βŒƒ + I)

Tip4

12. Lookup the view hierarchy
      - To look out the view structure or the hierarchy from the Xib or Storyboard and to find out its super view which view 's we can get using this shortcut.

(Ctrl + Shift + Click) ************************* (βŒƒ + ⇧ + Click)

Tip18

13. Open dependency in the assistant editor
      - When you are working with Xib or storyboard you will require to open the view controller, In order to open a destination file in the Secondary editor with the same Assistant editor, you can use.

(Ctl + Option + Cmd + Enter) ************************* (βŒƒ + βŒ₯ + ⌘ + ↩)

Tip21

14. Add and Remove Breakpoints
      - Add and Remove breakpoints.

(Cmd + \) ************************* (⌘ + \)

Tip5

15. Move Line / Selected text Up
      - We might find ourselves doing a bit of reordering in the file. One way to do it could be doing the old and trusted cut-paste technique 😁. However, if all we want is to move the code one line up or selected text then this shortcut will help.

(Option + Cmd + [) ************************* (βŒ₯ + ⌘ + [)

Tip35

16. Move Line / Selected text Down
      - We might find ourselves doing a bit of reordering in the file. One way to do it could be doing the old and trusted cut-paste technique 😁. However, if all we want is to move the code one line down or selected text then this shortcut will help.

(Option + Cmd + ]) ************************* (βŒ₯ + ⌘ + ])

Tip36

17. Search for lines of text in your files (project)
      - Search your text with multi kinds of filters like Containing, Matching word, Starting with or Ending with using this shortcut.

(Cmd + Shift + F) ************************* (⌘ + ⇧ + F)

Tip26

18. Find or search text with current file
      - Search your text with multi kinds of filters like Containing, Matching word, Starting with or Ending with using this shortcut.

(Cmd + F) ************************* (⌘ + F) & Hit enter to jump next result

Tip38

19. Find & Replace text with the current file
      - Search your text with multi kinds of filters like Containing, Matching word, Starting with or Ending with, and then enter your text to replace it using this shortcut.

(Option + Cmd + F) ************************* (βŒ₯ + ⌘ + F) 

Tip39

20. Jump to a Line
      - Jumps to a code line using this shortcut.

(Cmd + L) ************************* (⌘ + L)

Tip6

21. Show Library
      - When used in the source editor, this shortcut will show a library of code Snippets (First you have to create snippets then it will bring up), image assets, and color assets. On the other hand, when used in the storyboard, it will show a library of UI objects, image assets, and color assets.

(Shift + Cmd + L) ************************* (⇧ + ⌘ + L)

Tip11ii

22. Jump to defination
      - To directly jump to a definition, you can combine

(Ctrl + Cmd + Click) ************************* (^ + ⌘ + Click)

Tip8

23. Jump to file
      - It opens a jump bar from where you can search the desired file and you jump directly to it.

(Ctrl + 5) ************************* (βŒƒ + 5)

Tip31

24. Jump to Method
      - It opens a jump bar from where you can search the desired method and you jump directly to it.

(Ctrl + 6) ************************* (βŒƒ + 6)

Tip3

25. Disable/Enable all breakpoints
      - When you want to enable or disable the breakpoints throughout the Xcode workspace you can do it using this shortcut.

(Cmd + Y) ************************* (⌘ + Y)

Tip23

26. Search Documentation
      - Put a cursor on text or select the text then jump to the apple documentation using this shortcut.

(Ctrl + Option + Cmd + /) ************************* (βŒƒ + βŒ₯ + ⌘ + /)

Tip17

27. Create new tab
      - It will create a new tab, simply work with the multiple tabs.

(Cmd + T) ************************* (⌘ + T)

Tip10

28. Switching Tabs
      - Tab is one of the most commonly used features in Xcode. Using this shortcut allows you to switch tabs from left to right.

(Ctl + Tab) ************************* (οΌΎ + β‡₯)

Tip16

29. Close Tab
      - While working with the multiple tabs you can use this shortcut to close your current tab.

(Shift + Cmd + W) ************************* (⇧ + ⌘ + W)

Tip12

30. Show hide code review
      - Sometimes you might need to have a quick look on the changes you have made on your code. Use this shortcut to quickly switch to code review mode and have an overview on what you have changed, once done, just hit the shortcut again to switch back to you normal source editor mode.

(Shift + Option + Cmd + Enter) ************************* (⇧ + βŒ₯ + ⌘ + ↩)

Tip24

31. Commit Changes
      - When we are working with Git, bitbucket, or any source control tool we can directly commit over changes using this shortcut.

(Option + Cmd + C) ************************* (βŒ₯ + ⌘ + C)

Tip11

32. Reveal in Projet Navigator
      - Reveal file in projet navigator using this shortcut.

(Shift + Cmd + J) ************************* (⇧ + ⌘ + J)

Tip13

33. Open Preferences
      - Open your Xcode preferences to easily access your apple account, set up your Xcode preference, access the derived data path, and many more using this shortcut.

(Cmd + Comma(,)) ************************* (⌘ + ,)

Tip14

34. Split curent file
      - When you want to split your current file within the same tab you can do using this shortcut.

(Option + Cmd + ,) ************************* (βŒ₯ + ⌘ + ,)

Tip20

35. Create a new group
      - Select your folder then use the shortcut to create a group. At a time a single group will be created.

(Ctl + Option + Cmd + N) ************************* (βŒƒ + βŒ₯ + ⌘ + N)

Tip15

36. Left panel (navigator) tab switch
      - Switch between the different navigator from Project navigators to Report navigator using this shortcut.

(Cmd + (1-9)) ************************* (⌘ + (1-9))

Tip25

37. Hide left panel (navigator)
      - Hide the navigator using this shortcut.

(Cmd + 0) ************************* (⌘ + 0)

Tip28

38. Right panel (inspector) tab switch
      - Switch between the different navigators from File inspector to Connection inspector using this shortcut.

(Option + Cmd + (1-7)) ************************* (βŒ₯ + ⌘ + (1-7))

Tip27

39. Hide right panel (inspector)
      - Hide the inspector using this shortcut.

(Option + Cmd + 0) ************************* (βŒ₯ + ⌘ + 0)

Tip29

40. Open schema selection
      - When you are required to switch between the schema (Control + 0) open the scheme chooser. Select the scheme you want to run with the arrow keys and simply hit the return key to choose the schema.

(Ctl + 0) ************************* (βŒƒ + 0)

Tip30

41. Fold methods or class
      - When we have big projects or in case the file is huge with our code like extension or methods at that time we can fold code using this shortcut.

(Shift + Option + Cmd + ←) ************************* (⇧ + βŒ₯ + ⌘ + ←)

Tip40

42. Unfold methods or class
      - When we have big projects or in case the file is huge with our code like extension or methods at that time we can Unfold code using this shortcut.

(Shift + Option + Cmd + β†’) ************************* (⇧ + βŒ₯ + ⌘ + β†’)

Tip41

43. Clean the project
      - Occasionally Xcode gets frozen or something in our app becomes unresponsive or unpredictable. When that happens you first want to clean and then re-run the Xcode project which you can do using this shortcut. (FYI, You should not have to do this too often, since It will make building your app slower. It removes all the intermediary files and recreates them which takes more time to complete.)

(Command + Shift + K) ************************* (⌘ + ⇧ + K)

Tip42

Feedback

If you have any feedback, please reach out to me at chirag05k@gmail.com

#Xcode #iOS #Swift

About

Welcome 😊, Visual Xcode shortcuts which will help to speed up your development πŸš€. #iOS #Swift #Xcode #Shortcut