Recently in the "refactoring" book, Think of Xcode has a refactor function, do not know how much you use, with this feature in our development process, can improve the development efficiency.
Refactor
Right-click to display
Refactor First, Rename
Rename the symbol, modify the name of the property or method.
Of course it is possible that you are using the global replace method, but this cannot replace the file name of Class .
Under the demo, the Testviewcontroller. H. M. xib and the places used were modified to make meaningful life homeviewcontroller.
1. Right click on Testviewcontroller, select Refactor->rename
Rename2. Change Testviewcontroller to Homeviewcontroller, click Preview.
Rename3. Click View and confirm that the rename is correct. Click Save, and then click Continue. Rename completed. 4. Go Global Search Testviewcontroller
Search
There is no modification in the comment, select Replace with Homeviewcontroller.
Rename property operation also ibid. So see the variable name and method name and class name that do not conform to the specification, quickly modify it, improve the readability of the code.
Reference: HTTP://WWW.JIANSHU.COM/P/A9C4A666FC54
Xcode's Refactor use