OCKContact Class Reference

Inherits from NSObject
Conforms to NSCopying
NSSecureCoding
Declared in OCKContact.h

The OCKContact class is an object that represents a care contact for the OCKConnectViewController.

– initWithContactType:name:relation:tintColor:phoneNumber:messageNumber:emailAddress:monogram:image:

Returns an initialized contact using the specified values.

- (instancetype)initWithContactType:(OCKContactType)type name:(NSString *)name relation:(NSString *)relation tintColor:(nullable UIColor *)tintColor phoneNumber:(nullable CNPhoneNumber *)phoneNumber messageNumber:(nullable CNPhoneNumber *)messageNumber emailAddress:(nullable NSString *)emailAddress monogram:(null_unspecified NSString *)monogram image:(nullable UIImage *)image

Parameters

type

The contact type.

name

The contact name.

relation

The relationship to the contact.

tintColor

The contact tint color.

phoneNumber

The contact phone number.

messageNumber

The contact message number.

emailAddress

The contact email address.

monogram

The contact monogram.

image

The contact image.

Return Value

An initialized contact object.

Declared In

OCKContact.h

– initWithContactType:name:relation:contactInfoItems:tintColor:monogram:image:

Returns an initialized contact using the specified values.

- (instancetype)initWithContactType:(OCKContactType)type name:(NSString *)name relation:(NSString *)relation contactInfoItems:(NSArray<OCKContactInfo*> *)contactInfoItems tintColor:(nullable UIColor *)tintColor monogram:(null_unspecified NSString *)monogram image:(nullable UIImage *)image

Parameters

type

The contact type.

name

The contact name.

relation

The relationship to the contact.

contactInfoItems

The contact information for the contact.

tintColor

The contact tint color.

monogram

The contact monogram.

image

The contact image.

Return Value

An initialized contact object.

Declared In

OCKContact.h

  type

The contact type. This also determines the grouping of the contact in the table view.

@property (nonatomic, readonly) OCKContactType type

Discussion

See the OCKContactType enum.

Declared In

OCKContact.h

  name

A string indicating the name for a contact.

@property (nonatomic, readonly) NSString *name

Declared In

OCKContact.h

  relation

A string indicating the relationship to a contact.

@property (nonatomic, readonly) NSString *relation

Declared In

OCKContact.h

  tintColor

The tint color for a contact.

@property (nonatomic, readonly, nullable) UIColor *tintColor

Discussion

If the value is not specified, the app’s tint color is used.

Declared In

OCKContact.h

  contactInfoItems

The contact info items, which contain information about phone numbers, sms numbers, and other contact methods.

@property (nonatomic, readonly) NSArray<OCKContactInfo*> *contactInfoItems

Declared In

OCKContact.h

  monogram

A string indicating the monogram for a contact.

@property (nonatomic, readonly, null_resettable) NSString *monogram

Discussion

If a monogram is not provided, it will be generated automatically. If a monogram is available, it will be clipped to two glyphs.

Declared In

OCKContact.h

  image

An image for a contact.

@property (nonatomic, nullable) UIImage *image

Discussion

If an image is not provided, a monogram will be used for the contact. An image can be set after a contact object has been created. If an image is available, it will be displayed instead of the monogram.

Declared In

OCKContact.h