TestTaskViewControllerDelegate Class Reference

Inherits from NSObject
Conforms to ORKTaskViewControllerDelegate
Declared in ORKTaskTests.m

– taskViewController:didFinishWithReason:error:

Tells the delegate that the task has finished.

- (void)taskViewController:(ORKTaskViewController *)taskViewController didFinishWithReason:(ORKTaskViewControllerFinishReason)reason error:(NSError *)error

Parameters

taskViewController

The ORKTaskViewControllerinstance that is returning the result.

reason

An ORKTaskViewControllerFinishReason value indicating how the user chose to complete the task.

error

If failure occurred, an NSError object indicating the reason for the failure. The value of this parameter is nil if result does not indicate failure.

Discussion

The task view controller calls this method when an unrecoverable error occurs, when the user has canceled the task (with or without saving), or when the user completes the last step in the task.

In most circumstances, the receiver should dismiss the task view controller in response to this method, and may also need to collect and process the results of the task.

Declared In

ORKTaskViewController.h

– taskViewController:stepViewControllerWillDisappear:navigationDirection:

Tells the delegate that a step will disappear.

- (void)taskViewController:(ORKTaskViewController *)taskViewController stepViewControllerWillDisappear:(ORKStepViewController *)stepViewController navigationDirection:(ORKStepViewControllerNavigationDirection)direction

Parameters

taskViewController

The calling ORKTaskViewController instance.

stepViewController

The ORKStepViewController that has just finished.

direction

The ORKStepViewControllerNavigationDirection of navigation.

Discussion

This is called in the ORKStepViewControllerDelegate method for stepViewController:didFinishWithNavigationDirection: after saving the result of the step to the task view controller and before navigating to the next/previous step.

Declared In

ORKTaskViewController.h