I haven't been able to find anything specific to the Tag
documentation keyword. It appears to be a custom documentation keyword, though it doesn't appear in Quick Help as expected...
I'm guessing that it may just be a way to allow searching for related code... Maybe it'll come up as a new feature in the future - used to apply "tags" to specific symbols, as you would in Finder, say. That seems reasonable, given that the function referenced in the question is related to custom clustering (see Decluttering a Map with MapKit Annotation Clustering), and the documentation line says /// - Tag: CustomCluster
.
When you write a function, you can document the details of that function in Swift using a version of "markdown". See the Markup Formatting Reference and CommonMark for examples.
This documentation appears in the Quick Help popover box, as shown in the question, and in the Quick Help Inspector - displayed in the right-hand panel when your cursor is in a symbol (function name, for example), and you click the question mark in a circle at the top of the inspector panel.
Many pre-defined keywords exist for this documentation, such as - Parameters:
, - Returns:
, and - Throws:
. And, you can also use your own custom keywords. Usually the custom keywords appear in the Quick Help as well, but this - Tag:
keyword doesn't seem to do anything (at least in Xcode 9.4.1).
Here's an example of how to use Swift Documentation Markup:
/// Errors associated with String processing.
enum StringError: Error {
case cantCapitalizeAnEmptyString
}
/// Capitalizes a String item.
/// - Tag: I don't know what this is - it doesn't show in Quick Help.
/// - Parameter string: A String item to be capitalized.
/// - Throws `StringError.cantCapitalizeEmptyString` when provided String item is empty.
/// - Returns: The provided String item converted to all capital letters.
/// - Blah: A custom keyword I made up.
func capitalize(string: String) throws -> String {
if string.isEmpty {
throw StringError.cantCapitalizeAnEmptyString
}
return string.capitalized
}
Then, in the Quick Help Inspector, you'll see:

Or, of course, option-clicking the function name will display the Quick Help popover:

As noted in the question, the - Tag:
keyword doesn't display anything in either the Quick Help Inspector or the Quick Help popover.