我在几个地方的Xcode项目中更改了我的.h文件的prefix header
名称,然后将标题更改回原始名称。似乎我搞砸了我的消息来源。尝试从UIButton控制点击拖动到我的.h文件以创建 IBAction 时,
我收到以下错误:
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
我再一次尝试在类文件SGLoginHomeViewController.h中创建一个新的 IBAction
我相信我需要删除引用然后再添加它们,但是我该怎么做呢?
答案 0 :(得分:2)
请遵循: -
To Delete reference:_
1. Right click on your .h or .m file.
2. Click on "Delete". A pop up will open.
3. Click on "Remove reference". Your file reference has been deleted.
To add it again:-
1. Right click on your project.
2. Click on "Add files to 'YourProjectName'".
3. A pop up will open. Select you file & Click Add.
Note:- Make sure "Copy items into destination group's folder(if needed)" is unchecked.