<p>My world is surrounded by sticky notes, both electronic and paper, doing my best to keep track of Xcode shortcuts, tips and tricks. I strive to use the mouse as little as possible when coding, and without these tips I’d be lost. What better place to keep track of this stuff than to write about them here.</p> <p>This is the first post of what I hope is many where we can share tips and tricks on working with Xcode.<br> <span></span></p> <h5>Tip #1 – Split Editor View Vertically</h5> <p>If you like to have multiple code windows open at once, the Split Editor option is your friend (see the little square grid icon shown below).</p> <p><img src="http://iPhoneDeveloperTips.com/wp-content/uploads/2009/10/split1.png"></p> <p>By default, the windows are split horizontally. If you prefer to view your code side-by-side (nice for comparing), here’s how to tell the split to be vertical</p> <blockquote> <ol> <li>Hold down <strong>Option</strong> key when clicking the Split Window icon</li> </ol> <
<p>The iPhone provides a comprehensive set of operations for working with files and directories. <strong>NSFileManager</strong> includes methods for querying the contents of directories, creating, renaming and deleting contents, as well as getting/setting file attributes (readable, writeable, etc).</p> <h5>Point to the Documents Directory</h5> <p>Each application has its own sandbox in which you can read/write files. Files written to the sandbox are persistent across invocations of the application, including across application updates.</p> <p>You can locate the Documents directory in the sandbox as shown below:</p> <div><div><pre style="font-family:monospace"><span style="color:#11740a;font-style:italic">// For error information</span> <span style="color:#400080">NSError</span> <span style="color:#002200">*</span>error; <span style="color:#11740a;font-style:italic">// Create file manager</span> <span style="color:#400080">NSFileManager</span> <span style="color:#002200">*</span>file