0

我在一个也使用 carekit 的应用程序中使用了来自 researchkit 测试的定时步行。但是,我不知道为什么会收到此错误。任何帮助将不胜感激。这就是我到目前为止所拥有的。(错误状态使用未解析的标识符)

 import ResearchKit

  public var timedWalk: ORKOrderedTask 
{return ORKOrderedTask.timedWalk(withIdentifier: "Timed  Walk",intendedUseDescription: "Assessment measures balance", distanceInMeters: 3, timeLimit: 13, includeAssistiveDeviceForm: true, options: .excludeConclusion) 

 //Create a question.
let title = "Estimate your fall Risk"
let text = "This assessment measure how fast you walk to estimate your fall risk. Start from a sitting position stand walk 10 feet turn around and  walk back to sitting position"
***let questionStep = ORKQuestionStep(identifier: "Timed Get up and Go", title: title, text: text, answer: answerFormat)*** 
  questionStep.isOptional = false


       //Create an ordered task with a single question
   return ORKOrderedTask(identifier: "Timed Walk", steps: [questionStep])
4

1 回答 1

0

这是上述代码的语法正确版本:

public var timedWalk: ORKOrderedTask {
    return ORKOrderedTask.timedWalk(withIdentifier: "Timed Walk",
                                    intendedUseDescription:" Assessment measure, the, balance",
                                    distanceInMeters: 3, timeLimit: 13,  options: .excludeConclusion)
}
于 2016-12-09T21:22:00.850 回答