简体   繁体   中英

I did not use refactor to change a class' name in iOS/Xcode

I did a newbie thing renamed my one of my classes with just a double-click and rename. I know that this is the completely incorrect way of doing this but now I'm experiencing what seems to be a simple problem. When trying to connect a new "IBAction" or "IBOutlet" I get this error message:

Could not insert new action connection: Could not insert source code into document at URL file://localhost/Users/Myuser/file/filename/projectname/SGLoginHomeViewController.m because it does not contain a class interface for the class named SGLoginHomeViewController

I'm sure this can be easily fixed, but how?

PS I changed the prefix to RG instead of SG, and then back to SG. I made changes in the following locations: the @interface in the .h, the @implementation in the .m, and the file name in the left side-view of Xcode under the Project folder drop-down.

只需删除类引用并从其源文件夹位置删除该类

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM