views:

814

answers:

3

Hi,

I'm looking for a way to share some iPhone SDK source code I have with others.

Goals: Share iPhone SDK source code, Objective C written in XCode.

I have a good bit of source code I want to share. I'd like for it to be easy. I'd like for it to have syntax highlighting, by this I mean coloring and formatting Ideally it would allow me some room to make it "fit" into my site. I want it to look like basically another page on my site where the content is the code. It shouldn't be just a text file in other words.

Here's an example where someone was able to do this for C#: http://www.opennetcf.com/library/sdf/

I guess what I want is the ability to create html documentation for all the classes, etc.

+5  A: 

I don't know what tool is used in there, but I know Doxygen can generate HTML documentation for Objective-C code from specific formatted comments in your code

skinp
Doxygen generates source listing with syntax highlighting too.
Kristopher Johnson
I tried Doxygen and I'm really impressed and pleased with it. Great product. Thanks for telling me about it. I think it is what we need!
CJCraft.com
A: 

There’s a good article about this on CodeProject here: http://www.codeproject.com/KB/scripting/highlight.aspx

But you may want to build your own simple solution since you’ll have to modify the CodeProject Project to support ObjectiveC instead of JSCript, VBScript, C, XML and C#. For that I’d model my solution after Notepad++ where they simply understand basic commenting structure and highlight the keywords of a source file. I’ve found that for 90% of programming having keywords highlighted, proper tabbing and commenting is enough to get the point across.

Joe Basirico
+2  A: 

Use public versioning control repo, like github. For example on my sharing there.

leonho