/// <summary> /// Returns the required key descriptor for the specified formatting style of the contact. /// </summary> /// <returns>The for required keys for style.</returns> /// <param name="style">Style.</param> public static CNKeyDescriptor DescriptorForRequiredKeysForStyle(CNContactFormatterStyle style) { InternalCNKeyDescriptor keyDesc = null; var ptr = C.CNContactFormatter_descriptorForRequiredKeysForStyle(style); if (PInvokeUtil.IsNotNull(ptr)) { keyDesc = new InternalCNKeyDescriptor(ptr); CFFunctions.CFRelease(ptr); } return(keyDesc); }
/// <summary> /// Returns the contact name, formatted with the specified formatter. /// </summary> /// <returns>The from contact.</returns> /// <param name="contact">Contact.</param> /// <param name="style">Style.</param> public static NSString StringFromContact(CNContact contact, CNContactFormatterStyle style) { if (contact == null) { return(null); } NSString str = null; var ptr = C.CNContactFormatter_stringFromContact(contact.ToPointer(), style); if (PInvokeUtil.IsNotNull(ptr)) { str = new NSString(ptr); CFFunctions.CFRelease(ptr); } return(str); }
internal static extern /* NSString */ IntPtr CNContactFormatter_stringFromContact(/* CNContact */ IntPtr contact, CNContactFormatterStyle style);
internal static extern /* id<CNKeyDescriptor> */ IntPtr CNContactFormatter_descriptorForRequiredKeysForStyle(CNContactFormatterStyle style);