1. Search using RegEx:
- Select File Navigator from the menu on the left side of Xcode
- Switch the Text preference mode to Regular Expression
- Now we can find the type using RegEx
2. Open a project from Terminal with Xcode
We can open the Xcode project from Terminal. If run the command xed. in the project’s index directory, it will open the project directly.
3. See the interface of class or struct files
If you want to quickly see the parameters and methods used in the object, this tip is very useful.
- Open the Class or Struct file
- Using the shortcut ⌘⌃ ↑ (Cmd + Ctrl + ↑)
- Xcode will automatically create the interface of that object
4. Quickly access methods and variables in the object
You can access any method or parameter in an object using the Jump Bar.
- Use ⌃6 (Ctrl + 6) in class or struct file
- The Jump bar will be opened for the list of methods and parameters in the object
- You can choose the method or variable you want to access directly, or you can filter the list with text input for faster access.
5. Observe the variables while debugging
You see the state of the application while debugging with the Xcode breakpoint is fine, but when you want to observe the change in the variable you want to see the change of a command line the following is effective.
- Place the breakpoint where the variable you want to observe was first created
- Right click on the variable you want to observe in the Debug Area at the bottom left
- Continue to run the program after selecting Watch “variable name”
- When there is any change in that variable, Xcode will show you the line that caused the change
- Reference: https://medium.com/flawless-app-stories/7-useful-tips-and-tricks-for-xcode-52182ac1dfa1