OCKCareCardViewController Class Reference

Inherits from UIViewController
Declared in OCKCareCardViewController.h

The OCKCareCardViewController class is a view controller that displays the activities and events from an OCKCarePlanStore that are of intervention type (see OCKCarePlanActivityTypeIntervention).

It includes a master view and a detail view. Therefore, it must be embedded inside a UINavigationController.

– initWithCarePlanStore:

Returns an initialized care card view controller using the specified store.

- (instancetype)initWithCarePlanStore:(OCKCarePlanStore *)store

Parameters

store

A care plan store.

Return Value

An initialized care card view controller.

Declared In

OCKCareCardViewController.h

  store

The care plan store that provides the content for the care card.

@property (nonatomic, readonly) OCKCarePlanStore *store

Discussion

The care card displays activites and events that are of intervention type (see OCKCarePlanActivityTypeIntervention).

Declared In

OCKCareCardViewController.h

  delegate

The delegate can be used to modify or update the internvention events before they are displayed.

@property (nonatomic, weak, nullable) id<OCKCareCardViewControllerDelegate> delegate

Discussion

See the OCKCareCardViewControllerDelegate protocol.

Declared In

OCKCareCardViewController.h

  lastSelectedInterventionActivity

The last intervention activity selected by the user.

@property (nonatomic, readonly, nullable) OCKCarePlanActivity *lastSelectedInterventionActivity

Discussion

This value is nil if no intervention activity has been selected yet.

Declared In

OCKCareCardViewController.h

  lastSelectedInterventionEvent

The last intervention event selected by the user.

@property (nonatomic, readonly, nullable) OCKCarePlanEvent *lastSelectedInterventionEvent

Discussion

This value is nil if no intervention event has been selected yet.

Declared In

OCKCareCardViewController.h

  tableView

A reference to the UITableView contained in the view controller

@property (nonatomic, readonly, nonnull) UITableView *tableView

Declared In

OCKCareCardViewController.h

  glyphTintColor

The image that will be used to mask the fill shape in the week view.

@property (nonatomic, null_resettable) UIColor *glyphTintColor

Discussion

In order to provide a custom maskImage, you must have a regular size and small size. For example, in the assets catalog, there are “heart” and a “heart-small” assets. Both assets must be provided in order to properly render the interface.

The tint color that will be used to fill the shape.

If tint color is not specified, a default red color will be used.

Declared In

OCKCareCardViewController.h

  headerTitle

The string that will be used as the Care Card header title.

@property (nonatomic, null_resettable) NSString *headerTitle

Discussion

If the value is not specified, CareKit’s default string (“Care Completion”) is used.

Declared In

OCKCareCardViewController.h

  glyphType

The glyph type for the header view (see OCKGlyphType).

@property (nonatomic) OCKGlyphType glyphType

Declared In

OCKCareCardViewController.h

  customGlyphImageName

Image name string if using a custom image. Cannot access image name once image has been created and we need a way to access that to send the custom image name string to the watch

@property (nonatomic, copy) NSString *customGlyphImageName

Declared In

OCKCareCardViewController.h