Closed
Bug 1104281
Opened 10 years ago
Closed 9 years ago
(iOS) Figure out how to properly document Swift code
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: st3fan, Unassigned)
References
Details
Apple uses two conventions it seems: /// ... and /*! ... */ The latter is supposed to be picked up by Xcode so that you can option-click on things and instantly see documentation. But .. this currently does not work. Maybe there is an extra build phase or something that we have not enabled in the project. We need to investigate what to do here.
Updated•10 years ago
|
Summary: Figure out how to properly document Swift code → (iOS) Figure out how to properly document Swift code
Reporter | ||
Comment 1•10 years ago
|
||
This has some good hints: http://nshipster.com/swift-documentation/ The /// Style seems to work: https://www.dropbox.com/s/nx7tl82dwbizvic/Screenshot%202014-11-25%2013.26.47.png?dl=0
Updated•9 years ago
|
Group: mozilla-employee-confidential
OS: Mac OS X → iOS 7
Product: Firefox for Android → Firefox for iOS
Hardware: x86 → All
Version: Trunk → unspecified
Comment 2•9 years ago
|
||
The accepted answer in Stack Overflow also gives a good summary of what works right now. http://stackoverflow.com/questions/24047991/does-swift-have-documentation-comments-or-tools
Reporter | ||
Comment 3•9 years ago
|
||
Nice. Just to repeat what is in the SO answer: Here are some things that work for documenting swift code in Xcode 6. It is very buggy and sensitive to colons, but it's better than nothing: class Foo { /// This method does things. /// Here are the steps you should follow to use this method /// /// 1. Prepare your thing /// 2. Tell all your friends about the thing. /// 3. Call this method to do the thing. /// /// Here are some bullet points to remember /// /// * Do it right /// * Do it now /// * Don't run with scissors (unless it's tuesday) /// /// :param: name The name of the thing you want to do /// :returns: a message telling you we did the thing func doThing(name : String) -> String { return "Did the \(name) thing"; } }
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•