Search
Rich's Mad Rants
Powered by Squarespace

Creating iOS 5 Apps Discussion > Page 400 - Errata: cannot rename class in .m

The book directs to rename the WeightEntry class in .m, and goes on to say that the .m file will need to be manually renamed. I was not able to rename the class in the .m file. When I right-clicked on the class name and selected Refactor > Rename, I got the error, "The selection is not a type that can be renamed." So I tried renaming the class in the .h file and that not only worked fine, but it also renamed both files, too.

January 3, 2012 | Unregistered CommenterScott

I just checked it with Xcode 4.2.1, and it let me rename from WeightEntry.m. It also correctly changed the file names--so I'm guessing the file name issue may have been a bug with earlier versions of Xcode (or I had accidentally turned the option off).

January 4, 2012 | Registered CommenterRichard Warren