OCKCareContentsViewControllerDelegate Protocol Reference

Conforms to NSObject
Declared in OCKCareContentsViewController.h

An object that adopts the OCKCareContentsViewControllerDelegate protocol can use it to modify or update the events before they are displayed.

– careContentsViewController:didSelectRowWithAssessmentEvent: required method

Tells the delegate when the user selected an assessment event.

- (void)careContentsViewController:(OCKCareContentsViewController *)viewController didSelectRowWithAssessmentEvent:(OCKCarePlanEvent *)assessmentEvent

Parameters

viewController

The view controller providing the callback.

assessmentEvent

The assessment event that the user selected.

Declared In

OCKCareContentsViewController.h

– careContentsViewController:didSelectButtonWithInterventionEvent:

Tells the delegate when the user tapped an intervention event.

- (void)careContentsViewController:(OCKCareContentsViewController *)viewController didSelectButtonWithInterventionEvent:(OCKCarePlanEvent *)interventionEvent

Parameters

viewController

The view controller providing the callback.

interventionEvent

The intervention event that the user selected.

Discussion

If the user must perform some activity in order to complete the intervention event, then this method can be implemented to show a custom view controller.

If the completion status of the event is dependent on the presented activity, the developer can implement the careContentsViewController:shouldHandleEventCompletionForActivity to control the completion status of the event.

Declared In

OCKCareContentsViewController.h

– careContentsViewController:didSelectRowWithInterventionActivity:

Tells the delegate when the user selected an intervention activity.

- (void)careContentsViewController:(OCKCareContentsViewController *)viewController didSelectRowWithInterventionActivity:(OCKCarePlanActivity *)interventionActivity

Parameters

viewController

The view controller providing the callback.

interventionActivity

The intervention activity that the user selected.

Discussion

This can be implemented to show a custom detail view controller. If not implemented, a default detail view controller will be presented.

Declared In

OCKCareContentsViewController.h

– careContentsViewController:didSelectRowWithReadOnlyActivity:

Tells the delegate when the user selected a readonly activity.

- (void)careContentsViewController:(OCKCareContentsViewController *)viewController didSelectRowWithReadOnlyActivity:(OCKCarePlanActivity *)readOnlyActivity

Parameters

viewController

The view controller providing the callback.

readOnlyActivity

The readonly activity that the user selected.

Discussion

This can be implemented to show a custom detail view controller. If not implemented, a default detail view controller will be presented.

Declared In

OCKCareContentsViewController.h

– careContentsViewController:shouldHandleEventCompletionForInterventionActivity:

Asks the delegate if care view controller should automatically mark the state of an intervention activity when the user selects and deselects the intervention circle button. If this method is not implemented, care view controller handles all event completion by default.

- (BOOL)careContentsViewController:(OCKCareContentsViewController *)viewController shouldHandleEventCompletionForInterventionActivity:(OCKCarePlanActivity *)interventionActivity

Parameters

viewController

The view controller providing the callback.

interventionActivity

The intervention activity that the user selected.

Discussion

If returned NO, the careContentsViewController:didSelectButtonWithInterventionEvent method can be implemeted to provide custom logic for completion.

Declared In

OCKCareContentsViewController.h

– careContentsViewController:willDisplayEvents:dateComponents:

Tells the delegate when a new set of events is fetched from the care plan store.

- (void)careContentsViewController:(OCKCareContentsViewController *)viewController willDisplayEvents:(NSArray<NSArray<OCKCarePlanEvent*> *> *)events dateComponents:(NSDateComponents *)dateComponents

Parameters

viewController

The view controller providing the callback.

events

An array containing the fetched set of intervention events grouped by activity.

dateComponents

The date components for which the events will be displayed.

Discussion

This is invoked when the date changes or when the care plan store’s carePlanStoreActivityListDidChange delegate method is called. This provides a good opportunity to update the store such as fetching data from HealthKit.

Declared In

OCKCareContentsViewController.h