I want to create a Research Kit survey with boolean answer. Can anybody know how to use it.
Asked
Active
Viewed 71 times
1 Answers
0
ORKBooleanAnswerFormat *boolFormat = [ORKBooleanAnswerFormat new];
ORKQuestionStep *booleanStep1 = [[ORKQuestionStep alloc] initWithIdentifier:@"identifierQ1"];
booleanStep1.title = @"Are you feeling ill?";
booleanStep1.answerFormat = boolFormat;
booleanStep1.optional = NO;
// Present the task view controller.
ORKOrderedTask *task =
[[ORKOrderedTask alloc] initWithIdentifier:@"identifier8" steps:@[booleanStep1]];
ORKTaskViewController *taskViewController =
[[ORKTaskViewController alloc] initWithTask:task taskRunUUID:nil];
taskViewController.delegate = self;
[self presentViewController:taskViewController animated:YES completion:nil];

Ankit Goyal
- 3,019
- 1
- 21
- 26