Search code examples
xcodestoryboardcopy-pastetarget-action

How to copy paste code without unnecessary target action link on XCode?


When I create a new project and copy paste code from the old project, the target action link between the pasted method and storyboard in the old project will be added.

But I don't want the old action target link. If I click on the target action dot on the left side of method, it'll bring me to the storyboard in the old project.

So far, my way to fix it is modify method's name, like "foo" to "foo2". Is there a better solution?


Solution

  • Use Add Files to <your project> to wipe out all unnecessary dependencies.