Rename a Variable in XCode
You can easily rename a variable in XCode by selecting the variable and then right clicking on the variable and then choose: Refactor -> Rename, or by going to XCode’s Edit menu:
Edit -> Refactor -> Rename.
Fill in the new name, and then XCode will show you the code with new variable name (press Preview). Press Save to change every appearance of the old variable name with new name.