4 ms·
Regarding the "control drag to set an IBOutlet" stuff, I'll admit that it took me a while to understand what that was even doing. I'd be interested if anyone ha
by Aqua_Geek 15y ago
Regarding the "control drag to set an IBOutlet" stuff, I'll admit that it took me a while to understand what that was even doing. I'd be interested if anyone has any alternative ideas on how to do this - how do you specify the object on which the outlet should be created (e.g. the file's owner, the view controller, any other object in the nib, etc)?
> 2. It manages the project files and their hierarchy using a […] flat file (pbxproj). […]
The disparity of what the Finder sees vs what is set up in Xcode is the least of the problems with this setup. Have you ever tried to merge an Xcode project file? I've gotten to the point where I can open it in TextMate and do the merge manually pretty quickly. It's just stupid that I have to resort to that.
- sipefree 15y ago$ git mergetool Opens FileMerge. Then just keep tapping the down/left/right keys to choose changes.
- Aqua_Geek 15y agoThis works in theory. Once you start getting into complex projects, it quickly breaks down. Merge tools don't properly understand that, even though the closing tag (e.g. "};" in a project file or an XML node in a storyboard file) is the same, it doesn't mean that the contents are the same. You quickly end up with a corrupted file because it leaves off the closing tag on one of the two.
- kstenerud 15y agoGive p4merge a try. We have a huge codebase, and I've found that p4merge, though not perfect, tends to do better than the default. Another thing we've done to keep the insanity down is break our monolithic project into a few library projects to keep the project file merge damage to a minimum.
- frankus 15y ago> how do you specify the object on which the outlet should be created? The trick is to set your workspace to assistant mode (the split screen that usually has the interface on the right and the implementation on the left -- the button with the tux). Then select your .xib file in the project navigator. The "Counterparts" navigation menu at the top of the right pane should have header files for all of the custom objects instantiated in the nib. Just choose the one you want to add an outlet/action to, and right-drag from the object you want to connect as an outlet (or have trigger an action) over to the interface file. It will prompt you whether to add an outlet or action (if applicable) and for a name of the outlet or action. It will add the property, synthesize it, add it to dealloc (if you're not using ARC) and free it viewDidUnload (if it's a view controller subclass).