OCKPatientWidget Class Reference

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

The OCKPatientWidget class is an object that represents a patient widget to be presented on OCKInsightsViewController.

Some patient widgets can be populated using an activity identifier. For these widgets, the content is automatically populated using the activity title and threshold values.

All patient widgets can be manually populated with content also.

+ defaultWidgetWithActivityIdentifier:tintColor:

Returns a default patient widget using the specified activity identifier. The widget content is automatically populated with activity title and threshold value.

+ (OCKPatientWidget *)defaultWidgetWithActivityIdentifier:(NSString *)activityIdentifier tintColor:(nullable UIColor *)tintColor

Parameters

activityIdentifier

The widget activity identifier.

tintColor

The widget tint color.

Return Value

An initialized patient widget object.

Discussion

The tint color is only applied when a threshold has been triggered.

Declared In

OCKPatientWidget.h

+ defaultWidgetWithTitle:text:tintColor:

Returns a default patient widget using the specified values. A default widget includes a title label and a text label.

+ (OCKPatientWidget *)defaultWidgetWithTitle:(NSString *)title text:(NSString *)text tintColor:(nullable UIColor *)tintColor

Parameters

title

The widget title.

text

The widget text.

tintColor

The widget tint color.

Return Value

An initialized patient widget object.

Declared In

OCKPatientWidget.h

+ stackedWidgetWithPrimaryText:primaryIcon:secondaryText:secondaryIcon:tintColor:

Returns a stacked patient widget using the specified values. A stacked widget includes a 2x2 grid with an icon and text label stacked.

+ (OCKPatientWidget *)stackedWidgetWithPrimaryText:(NSString *)primaryText primaryIcon:(UIImage *)primaryIcon secondaryText:(nullable NSString *)secondaryText secondaryIcon:(nullable UIImage *)secondaryIcon tintColor:(nullable UIColor *)tintColor

Parameters

primaryText

The widget primary text.

primaryIcon

The widget primary icon.

secondaryText

The widget seconday text.

secondaryIcon

The widget seconday icon.

tintColor

The widget tint color.

Return Value

An initialized patient widget object.

Declared In

OCKPatientWidget.h

+ badgeWidgetWithTitle:value:tintColor:

Returns a badge patient widget using the specified values. A badge widget includes a title label and a numeric label.

+ (OCKPatientWidget *)badgeWidgetWithTitle:(NSString *)title value:(NSNumber *)value tintColor:(nullable UIColor *)tintColor

Parameters

title

The widget title.

value

The widget numeric value.

tintColor

The widget tint color.

Return Value

An initialized patient widget object.

Declared In

OCKPatientWidget.h

+ imageWidgetWithTitle:image:tintColor:

Returns an image patient widget using the specified values. An image widget includes a title label and a text label.

+ (OCKPatientWidget *)imageWidgetWithTitle:(NSString *)title image:(UIImage *)image tintColor:(nullable UIColor *)tintColor

Parameters

title

The widget title.

image

The widget image.

tintColor

The widget tint color.

Return Value

An initialized patient widget object.

Declared In

OCKPatientWidget.h