swift - Take a result in Researchkit from array of ORKQuestionResult in a string? -
can't find logic or solution of taking simple answer string in array of orkstepresult. working before :
stepresults in taskviewcontroller.result.results! as! [orkstepresult] { result in stepresults.results! { switch result.identifier { case "themaquestionstep": if let questionresult = result as? orkquestionresult { questionresultthema = string(questionresult.answer?.objectatindex(0)) } after time , update (swift & researchkit), didn't. line make me crazy 1 :
questionresultthema = string(questionresult.answer?.objectatindex(0)) if :
questionresultthema = string(describing: questionresult.answer) it give me right response, in array :
( 6 )>
Comments
Post a Comment