How to rename a class or method?

Select the class or method name. Enter Command+R (or Control+R).

Enter the new name.

Optionally explore the proposed refactoring.

Click the checkmark (✓), or x to reject.