markdownName
TypeScriptstatic get markdownName(): stringSwift declarationstatic let markdownName: StringThe Markdown name associated with an attributed string key.
enum · iOS 15.0+ · SDK 27.1
@frozen enum InflectionRuleAttributeA rule that affects how an attributed string performs automatic grammatical agreement. Most apps can rely on loading localized strings to perform automatic grammar agreement. Typically, strings in your app's strings files use the Markdown extension syntax to indicate portions of the string that may require inflection to agree grammatically. This transformation occurs when you load the attributed string with methods like `init(localized:options:table:bundle:locale:comment:)`. However, if the system lacks information about the words in the string, you may need to apply an inflection rule programmatically. For example, a social networking app may have gender information about other users that you want to apply at runtime. When performing manual inflection at runtime, you use an inflection rule to indicate to the system what portions of a string should be automatically edited, and what to match. Apply the ``AttributeScopes/FoundationAttributes/inflect`` attribute to set an ``InflectionRule`` on an ``AttributedString``, then call ``AttributedString/inflected()`` to perform the grammar agreement and produce an edited string. ```swift var string = AttributedString(localized: "They liked your post.") // The user who liked the post uses feminine pronouns. var morphology = Morphology() morphology.grammaticalGender = .feminine string.inflect = InflectionRule(morphology: morphology) let result = string.inflected() // result == "She liked your post." ```
static get markdownName(): stringSwift declarationstatic let markdownName: StringThe Markdown name associated with an attributed string key.
static get nameValue(): stringSwift declarationstatic let name: StringThe name of the key.
No declarations were skipped in this snapshot.