Swift Language Documentation markup Class documentation

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

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



Got any Swift Language Question?