I use the ability of Xcode 5 to document my code using the syntax of supported comments ( see this SO question ). Xcode 6 supports it with Objective-C sources, unfortunately not with Swift sources.
I would like to do inline documentation on the .swift source. Any idea how to do this or best practices?
Thanks in advance,
Louis
It looks like you can add function descriptions:
/** This is a description of my function */ func myFunc() { } ///this is a description of my second function func myFunc2(){ }
but none of the headerdoc tags are currently supported. This will probably be supported by the time Xcode 6 is released.
, Xcode 6. , , :
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 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"; } }
Quick Help, , , , .
- , .
Source: https://habr.com/ru/post/1546466/More articles:Testing if initialization of static local objects is thread safe - c ++paypal api: немедленно оплатить доставку без адреса доставки - c#How to set up collaboration with Git? - gitString.Format decimal with two thousand separators and forced decimals - stringThe difference between git and .patch packages - gitIs it possible to reuse a datalist for multiple elements? - htmlIncorrect evidence of AST transformation in Agda - agdaCan I use RedirectAttributes or FlashMap in Interceptor Spring MVC - javaConnectionString in app.Config not working - c #You need to use floats for performance, but you need double precision calculations - performanceAll Articles