2

I am working in XCode and I copied a view controller over to a different project, but all the connections/outlets are still connected to the old project. If I mouse over the connection dot, it highlights the outlet object in the other project. How do I remove all the connections for the class?

It seems like if the ViewController's name is the same, if I add the a IBOutlet of the same type and name it will automatically connect to the old project.

Thanks!

Alan
  • 9,331
  • 14
  • 52
  • 97
  • @AnoopVaidya I did remove it, but I want to use the same code that i have been using. I tried removing it and creating a new view controller and pasting the code into the view controller. – Alan Mar 19 '13 at 17:45
  • This question wasn't originally a duplicate of the linked "duplicate" but I added an [answer](http://stackoverflow.com/a/37324620/3681880) there that deals with this question, too. Basically Xcode is just getting confused because the view controller and the outlet name are the same in both open projects. Close one of the projects and Xcode will eventually figure things out. – Suragch May 19 '16 at 13:30

1 Answers1

7

If you paste the classes in while the source project is open, it will link for some reason. Once you quit xCode and reopen just the new project, it will clear the connections to the old project!

Alan
  • 9,331
  • 14
  • 52
  • 97