How to edit iPhone code
The main tool you use to write your code is the Xcode text editor. This advanced text editor provides several convenient features:
Header-file lookup. By Command–double-clicking a symbol, you can view the header file that declares the symbol.
API reference lookup. By Option–double-clicking a symbol, you get access to API reference that provides information about the symbol’s usage.
Code completion. As you type code, you can have the editor help out by inserting text for you that completes the name of the symbol Xcode thinks you’re going to enter. Xcode does this in an unobtrusive and overridable manner.
Code folding. With code folding, you can collapse code that you’re not working on and display only the code that requires your attention.
There aren’t a lot of options for writing code on your iPhone, so picking the best option wasn’t all that difficult. Nonetheless, Nebulous Notes wins out thanks to its better-than-average Dropbox-syncing abilities, handy time-saving features, and ability to serve as more than just your programming text editor.
And there isn’t a ton of competition for iPhone-based programming text editors, but there are a few options worth looking at.
For starters, CodeToGo ($3) lets you write code (in many, many supported languages) and actually test it within the app. Nimbus Source Code Editor is pricey but supports multiple storage options, like FTP and WebDAV, in addition to Dropbox.
It offers line numbering, too. Another option is to just use an SSH app (like Prompt) to access your web server and then edit your code via the command line in emacs (or whatever you prefer).
Textastic Code Editor for iPhone:
Textastic is a fast and versatile text, code and markup editor supporting syntax highlighting of over 80 programming and markup languages. Connect to FTP, SFTP and WebDAV servers or to your Dropbox account. Use the built-in WebDAV server to easily transfer files from your Mac or PC over Wi-Fi.