Swift Language Documentation markup Class documentation


Here is a basic class documentation example:

/// Class description
class Student {

    // Member description
    var name: String
    /// Method description
    /// - parameter content:   parameter description
    /// - returns: return value description
    func say(content: String) -> Bool {
        print("\(self.name) say \(content)")
        return true

Note that with Xcode 8, you can generate the documentation snippet with command+option+/.

This will return: enter image description here