Dafurman
Dafurman

Reputation: 414

Adding Custom Documentation to Overridden Functions

I've been trying to get into the habit of adding Apple's variant of Markdown documentation to all functions that I write. However, I'm unsure how to add this documentation to show up in quicklook windows. Is it possible to replace, or ideally append to existing documentation?

For example, in this picture, the quicklook window shows the existing Markdown documentation instead of the documentation that I've written above.

Here's an example of what I'm referring to

Upvotes: 2

Views: 58

Answers (1)

glyvox
glyvox

Reputation: 58049

Sadly, there seems to be no way to do this.

You can define a new function with its own documentation that calls the overridden function and nothing else.

Example:

/**
 custom documentation
 */
func viewDidLoadOverridden() {
    viewDidLoad()
}

Result:

custom documentation for "overridden" function

Upvotes: 1

Related Questions