Edit all occurrences of a symbol in your code

You can edit all occurrences of a symbol, such as a local variable or parameter, by editing just one occurrence in the current file.

Edit all all occurrences of the symbol in the current scope

  1. Command-click on a symbol in the source editor, then choose Edit All in Scope from the Action menu.

  2. As you edit the symbol, all highlighted occurrences of the symbol are updated.

  3. Press Return to accept the change or Escape to cancel.

Edit all all occurrences of the symbol in the project

  1. Command-click on a symbol in the source editor, then choose Rename from the Action menu.

    The edit area collapses to show all source, Interface Builder, and Core Data files in which the symbol occurs.

  2. As you edit the symbol, all occurrences of the symbol are updated.

  3. Press Return to accept the changes or Escape to cancel

See alsoAnalyze your code for potential flaws