Platforms to show: All Mac Windows Linux Cross-Platform
Back to CNContactFormatterMBS class.
CNContactFormatterMBS.attributedStringFromContact(contact as CNContactMBS, Style as Integer, DefaultAttributes as Dictionary = nil) as NSAttributedStringMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Contacts | MBS Mac64bit Plugin | 16.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
contact: The contact whose name is to be formatted.
style: The formatting style to be used for the contact name.
attributes: The default attributes to use. For more information, see NSFormatter.
Returns the formatted contact name as an attributed string.
This method behaves similarly to stringFromContact, except that it returns an attributed string. It includes the attribute key CNContactPropertyAttribute, whose attribute values are contact property keys, such as CNContactGivenNameKey. This identifies the name components in the formatted contact name.
See also:
CNContactFormatterMBS.available as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Contacts | MBS Mac64bit Plugin | 16.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
Should return true in a 64-bit Mac app on Mac OS X 10.11 or newer.
CNContactFormatterMBS.CNContactPropertyAttribute as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Contacts | MBS Mac64bit Plugin | 16.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
If the attributes include the key CNContactPropertyAttribute whose attribute values are contact property keys, such as CNContactGivenNameKey. This identifies the name components in the formatted contact name.
CNContactFormatterMBS.delimiterForContact(contact as CNContactMBS) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Contacts | MBS Mac64bit Plugin | 16.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
contact: The contact whose name is to be formatted.
Returns the delimiter to use between name components.
If contact is nil, or if it has no first name, middle name, or last name, this method returns an empty string.
CNContactFormatterMBS.descriptorForRequiredKeysForStyle(Style as Integer) as CNKeyDescriptorMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Contacts | MBS Mac64bit Plugin | 16.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
style: The formatting style to be used for contact name.
Returns the contact key descriptor for the formatting style.
Include this method with the keys to fetch when fetching contacts. To format multiple styles, you can include multiple key descriptors with the keys to fetch.
CNContactFormatterMBS.nameOrderForContact(contact as CNContactMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Contacts | MBS Mac64bit Plugin | 16.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
contact: The contact whose name is to be formatted.
Returns the display order to use when combining the given name and family name components.
For more information about display name orders, see CNContactDisplayNameOrder.
CNContactFormatterMBS.stringFromContact(contact as CNContactMBS, Style as Integer) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
shared method | Contacts | MBS Mac64bit Plugin | 16.3 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
contact: The contact whose name is to be formatted.
style: The formatting style to be used for the contact name.
See also:
The items on this page are in the following plugins: MBS Mac64bit Plugin.