Platforms to show: All Mac Windows Linux Cross-Platform

Back to CNPostalAddressFormatterMBS class.

CNPostalAddressFormatterMBS.attributedStringFromPostalAddress(postalAddress as CNPostalAddressMBS, 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
Returns a formatted postal address as an attributed string.

postalAddress: The postal address to format.
DefaultAttributes: The default attributes to use. To learn more, see NSFormatter.

Returns the formatted postal address as an attributed string.

This method behaves similarly to stringFromPostalAddress, except that it returns an attributed string. It includes the attribute key CNPostalAddressPropertyAttribute, whose attribute values are postal address property keys, such as CNPostalAddressStreetKey. This identifies the postal address components in the formatted postal address. Also includes the attribute key CNPostalAddressLocalizedPropertyNameAttribute whose attribute values are the localized strings for the postal address property keys.

See also:

CNPostalAddressFormatterMBS.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
Whether this class is available.

Should return true in a 64-bit Mac app on Mac OS X 10.11 or newer.

CNPostalAddressFormatterMBS.CNPostalAddressLocalizedPropertyNameAttribute 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
This constant is a key in the attributed string whose value is a localized version of the CNPostalAddress property key.

This label takes a string value.

CNPostalAddressFormatterMBS.CNPostalAddressPropertyAttribute 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
This constant is a key in the attributed string whose value is a CNPostalAddress property key.

This key takes a string value.

CNPostalAddressFormatterMBS.stringFromPostalAddress(postalAddress as CNPostalAddressMBS, 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
Returns a formatted postal address.

Style can currently only be CNPostalAddressFormatterStyleMailingAddress.

See also:

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


The biggest plugin in space...