Xcode

  1. Ctrl + 6 can view the properties and methods of the current class, and you can also type filter to quickly jump to the desired properties or methods

  2. Select Window -> Tile Window to Left/Right of Screen. This allows Xcode and the emulator to fill the Left and Right sides of the Screen in full, adjustable, or with other Windows

  3. Cmd + Ctrl + Alt + F fixes all of the following errors instead of one by one

  4. Cmd + Shift + O If you want a class or method, press return to jump to the specified line

  5. Cmd + Ctrl + ← or Cmd + Ctrl + → The classes/files that can be accessed before and after the switch

  6. Hold down Cmd and mouse over {that will highlight a match} to check for a match

    Hold down theCmd, click on the class name or method name to bring up the action menu (skip to Definition/help document/Add comments/Add Parameters, etc.)

  7. CTRL + I code typesetting, you can select CMD + A all then CTRL + I typesetting

  8. Cmd + [0 to 9] 1 to 9 Switch the navigation panel. 0 Display or hide the navigation panel

  9. Cmd + Alt + [0 to 3] 1 to 3 Switch the navigation panel on the right. 0 Display or hide the navigation panel

  10. Cmd + Alt + / Select a method name or variable to quickly add a document comment

  11. Cmd + Ctrl + E quickly rename variables

  1. Alt + ClickHold down theAltClick on a class in the left panel to open another class panel
  2. Cmd + Alt + JLocate the filter input box at the bottom of the left to search for classes. Click the alarm icon on the right to show the recently opened class files. Click the icon on the far right to show the class files you have changed but have not submitted
  3. Alt + please or Alt + -You can move word by word in a line, match, plusShiftIt is selected
  4. Cmd + please or Cmd + -You can move it to the head or the tail in a row, plusShiftIt is selected
  5. Cmd + LCall up the input box, enter the number of lines, enter, jump to the specified line
  6. Cmd + Shift + JDisplays the project location of the class
  7. AltHold down theAltSelect different lines to edit more than one line at a time

  1. Cmd + T opens a new Tab, which can separate different classes for easy switching

  2. Cmd + Shift + [or Cmd + Shift +] Toggles the same Tab class

  3. Ctrl + 2 displays a list of recently accessed classes

StoryBoard XIB

  1. Alt Select a view, hold down Alt, and move the mouse to view the margin between the view and other views

  2. Shift you can hold down Shift to select multiple views while adding constraint layouts

  3. Alt + Shift + Click to view the hierarchy of the selected view

  4. Cmd + Shift + L opens the View gallery panel

  5. Alt Hold Alt and drag to View while the View gallery panel remains open

  6. The lock cannot be changed by setting All Properties as shown

  7. When Shift adds a constraint, hold down Shift to select multiple constraints to add at once

  8. Cmd When you want to drag A view A to overlay B on top of another view, hold down Cmd drag so that A is on top of B instead of inside it

debugging

  1. Cmd + Shift + YShow/hide the console
  2. Cmd + Shift + CThe cursor switches to the console
  3. Cmd + KClear console
  4. Cmd + \Add/delete breakpoints
  5. Cmd + YBreakpoint valid/invalid
  6. Fn + 6Step over to skip
  7. Fn + 7Step in to jump into a
  8. Fn + 8Step out out

View Debugging

  1. Shift + Cmd + DSelect a View and pressShift + Cmd + D, can be quickly positioned in the left column

Swift Notes

  1. use//MARK: -The code that distinguishes a class

  1. // FIXME: – // TODO: – Can mark the convenience to be fixed, or to be implemented, this Xcode does not have any markup, you can only search the relevant characters to find the corresponding fix or implementation method

  2. # Warning (“Not actually yet.”) Xcode will have a corresponding warning

  1. #error("Not actually yet")Xcode will prompt you with an error, which will cause a compilation error

  1. Available (Swift, deprecated: 5.3, message: "Hopefully it's fixed now?" )

You can flag that the class or method has been deprecated in Swift 5.3, Xcode is just a warning, and this can be used as needed

  1. @available(Swift, Obsoleted: 5.3, Message: "Hopefully it's fixed now?" )

Again deprecated, but Xcode prompts an error

The simulator

  1. Cmd + KThe pop-up keyboard
  2. Cmd + Shift + AYou can switchlight darkmodel
  3. Cmd + Hhidden
  4. Cmd + LLock screen
  5. Cmd + Shift + HUnlock or go back to the home page and double-click twiceHA task list pops up
  6. Cmd + 1/2/3Resize the screen
  7. Cmd + please/-Rotate clockwise/counterclockwise
  8. Cmd + write/leftAdjust the volume
  9. Cmd + Sscreenshots
  10. Cmd + Ctrl + CTake a screenshot and copy it
  11. Alt + ShiftDrag gestures with the mouse
  12. AltZoom operation with mouse
  13. Cmd + MMinimize to the desktop menu bar

tool

  1. XcodeProjects

It’s easy to do Pod operations, clean up Derived data, customize commands, and more. See here


Mac

  1. Cmd + Shift + .Show hidden files

More and more

  1. Xcode Debug Debug summary
  2. www.hackingwithswift.com/articles/22…
  3. www.hackingwithswift.com/articles/17…