Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

CNContactFormatterMBS.attributedStringFromContact(contact as CNContactMBS, Style as Integer, DefaultAttributes as Dictionary = nil) as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Formats the contact name as an attributed string.
Notes:
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:

Feedback, Comments & Corrections

CNContactFormatterMBS.available as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Whether this class is available.
Notes: Should return true in a 64-bit Mac app on Mac OS X 10.11 or newer.

Feedback, Comments & Corrections

CNContactFormatterMBS.CNContactPropertyAttribute as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: One of the attributes in the attribute dictionary.
Notes: 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.

Feedback, Comments & Corrections

CNContactFormatterMBS.delimiterForContact(contact as CNContactMBS) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Returns the delimiter to use between name components.
Notes:
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.

Feedback, Comments & Corrections

CNContactFormatterMBS.descriptorForRequiredKeysForStyle(Style as Integer) as CNKeyDescriptorMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Returns the required key descriptor for the specified formatting style of the contact.
Notes:
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.

Feedback, Comments & Corrections

CNContactFormatterMBS.nameOrderForContact(contact as CNContactMBS) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Returns the display name order.
Notes:
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.

Feedback, Comments & Corrections

CNContactFormatterMBS.stringFromContact(contact as CNContactMBS, Style as Integer) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method Contacts MBS Mac64bit Plugin 16.3 Yes No No Yes, macOS only No
Function: Returns the contact name, formatted with the specified formatter.
Notes:
contact: The contact whose name is to be formatted.
style: The formatting style to be used for the contact name.

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Mac64bit Plugin.




Links
MBS Xojo blog