-1

I want to create a Research Kit survey with boolean answer. Can anybody know how to use it.

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

1 Answers1

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