Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear/Remove all connections in a Xcode project

I'm a newbie to Xcode, Objective-C and iOS programming (fully comfortable in R however, so familiar with programming concepts). I'm working my way through building my first app using a couple of books.

I have botched some or most connections due to misunderstanding the concept at first, and I think also renaming objects and variables has caused confusion (connections = targets and actions as I understand it). In Xcode,

  1. is there a way to remove/clear all these at once?
  2. is there a tool to find the orphaned objects (ones that still need either a target or action)?
  3. is there a tool to summarize all of them? They don't really appear in raw code any place, right? They are embedded in the .xib if I understand correctly.

I'm on OSX 10.7.2 and Xcode 4.2.1 Thanks!

like image 325
Bryan Hanson Avatar asked Dec 07 '25 12:12

Bryan Hanson


1 Answers

Depending on how deep you are in the project, you could simply create a brand new project and copy your code from the old to the new (and recreate your XIB's; the new ones would have no botched connections).

Or, you'd have to go into each of your XIB files (they're text) and you can delete the connections en masse there (look for entries like IBToOneOutletInfo, IBActionInfo, etc.). Best to do this from within Xcode though, with the built in Interface Builder (just click on the "X"s next to the connections and actions for each object to officially disconnect them).

like image 184
Michael Dautermann Avatar answered Dec 09 '25 04:12

Michael Dautermann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!