From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Learn how to rename identifiers

Learn how to rename identifiers

From the course: iOS Development Tips

Learn how to rename identifiers

- [Instructor] One of the core elements of clean code is having code that is consistent with identifiers. Take a look at this code for the tip from last week. And you'll see in the application, I've got a few problems with it. I'm not being very consistent on these identifiers such as hue color TVC and color table view controller. However, these identifiers are all over my code. There's a great way to get consistency using refactoring. Let's do in the app delegate and go to hue color TVC. And now I'm going to right-click, once I select it, and you'll see it says refactor and rename. This will fold up and give you all the instances where you have it, which in this case is only in the app delegate. So you can see up here the class says app delegate dot Swift. Now I can edit this in this one with the box. And I'm going to change it so that everything is reading nice and clean as table view controller. And you can see that it's now changed also in the line 20 code. And I can go ahead and…

Contents