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:(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

  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

  phoneNumber

A CNPhoneNumber indicating the phone number for a contact.

@property (nonatomic, readonly, nullable) CNPhoneNumber *phoneNumber

Discussion

If a phone number is not specified, the phone table view row will not be visible for the contact.

Declared In

OCKContact.h

  messageNumber

A CNPhoneNumber indicating the message number for a contact.

@property (nonatomic, readonly, nullable) CNPhoneNumber *messageNumber

Discussion

If a message number is not specified, the message table view row will not be visible for the contact.

Declared In

OCKContact.h

  emailAddress

A string indicating the email address for a contact.

@property (nonatomic, readonly, nullable) NSString *emailAddress

Discussion

If an email address is not specified, the email table view row will not be visible for the contact.

Declared In

OCKContact.h

  monogram

A string indicating the monogram for a contact.

@property (nonatomic, readonly) NSString *monogram

Discussion

If a monogram is not provided, the image will be used for the contact.

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