Няма описание

ProfileViewController.swift 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // ProfileViewController.swift
  3. // EncuestaMarle
  4. //
  5. // Created by Tatiana Castro on 5/21/19.
  6. // Copyright © 2019 Marle. All rights reserved.
  7. //
  8. import UIKit
  9. import ResearchKit
  10. class ProfileViewController: UIViewController {
  11. @IBAction func see_consent(_ sender: Any) {
  12. // func taskViewController(taskViewController: ORKTaskViewController, didFinishWithReason reason: ORKTaskViewControllerFinishReason, error: NSError?) {
  13. // switch reason {
  14. // case .completed:
  15. // let result = task.result
  16. // if let stepResult = result.stepResultForStepIdentifier("ConsentReviewStep"),
  17. // let signatureResult = stepResult.results?.first as? ORKConsentSignatureResult {
  18. // signatureResult.applyToDocument(consentDocument)
  19. //
  20. // consentDocument.makePDF { (data, error) -> Void in
  21. // let tempPath = NSTemporaryDirectory() as NSString
  22. // let path = tempPath.appendingPathComponent("signature.pdf")
  23. // data?.writeToFile(path, atomically: true)
  24. // print(path)
  25. // }
  26. //
  27. // }
  28. //
  29. // default:
  30. // break
  31. // }
  32. // }
  33. }
  34. // func taskViewController(_ taskViewController: ORKTaskViewController?, didFinishWith reason: ORKTaskViewControllerFinishReason) throws {
  35. // switch reason {
  36. // case ORKTaskViewControllerFinishReasonCompleted:
  37. // var signatureResult = task.result.stepResult(forStepIdentifier: "consentReviewIdentifier").firstResult() as? ORKConsentSignatureResult
  38. // if signatureResult?.signature.signatureImage != nil {
  39. // signatureResult?.signature.title = "\(signatureResult?.signature.givenName ?? "") \(signatureResult?.signature.familyName ?? "")"
  40. // signatureResult?.apply(toDocument: consentDocument)
  41. //
  42. // consentDocument.makePDF(withCompletionHandler: { pdfFile, error in
  43. // var paths = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)
  44. // var filePath = URL(fileURLWithPath: paths[0]).appendingPathComponent("Consent.pdf").absoluteString
  45. // try? pdfFile?.write(toFile: filePath, options: .atomic)
  46. // })
  47. // }
  48. // default:
  49. // break
  50. // }
  51. // }
  52. override func viewDidLoad() {
  53. super.viewDidLoad()
  54. // Do any additional setup after loading the view.
  55. }
  56. /*
  57. // MARK: - Navigation
  58. // In a storyboard-based application, you will often want to do a little preparation before navigation
  59. override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
  60. // Get the new view controller using segue.destination.
  61. // Pass the selected object to the new view controller.
  62. }
  63. */
  64. }