From fa23b2a84183c8d5cb1c6654ddfef6d547df334f Mon Sep 17 00:00:00 2001 From: Eric Schramm Date: Wed, 18 Jul 2018 13:38:03 -0500 Subject: [PATCH] reverted back to original initializer --- ResearchKit/Consent/ORKConsentReviewStep.h | 24 +++---------------- ResearchKit/Consent/ORKConsentReviewStep.m | 10 -------- .../ORKCatalog/Tasks/TaskListRow.swift | 3 ++- 3 files changed, 5 insertions(+), 32 deletions(-) diff --git a/ResearchKit/Consent/ORKConsentReviewStep.h b/ResearchKit/Consent/ORKConsentReviewStep.h index a644c708d1..ec3aafa3e0 100644 --- a/ResearchKit/Consent/ORKConsentReviewStep.h +++ b/ResearchKit/Consent/ORKConsentReviewStep.h @@ -67,30 +67,12 @@ ORK_CLASS_AVAILABLE /** Returns an initialized consent review step using the specified identifier, signature, and consent document. - @param identifier The identifier for the step. - @param signature The signature to be collected, if any. - @param consentDocument The consent document to be reviewed. - @param requiresScrollToBottom Pass `YES` to require the user to scroll to the bottom of the consent - document before enabling the `Agree` button. - - @return An initialized consent review step. - */ -- (instancetype)initWithIdentifier:(NSString *)identifier - signature:(nullable ORKConsentSignature *)signature - inDocument:(ORKConsentDocument *)consentDocument - requiresScrollToBottom:(BOOL)requiresScrollToBottom; - -/** -Returns initialized consent review step using the specified identifier, signature, and consent document. - -This method is a convenience initializer. - @param identifier The identifier for the step. @param signature The signature to be collected, if any. @param consentDocument The consent document to be reviewed. - -@return An initialized consent review step. -*/ + + @return An initialized consent review step. + */ - (instancetype)initWithIdentifier:(NSString *)identifier signature:(nullable ORKConsentSignature *)signature inDocument:(ORKConsentDocument *)consentDocument; diff --git a/ResearchKit/Consent/ORKConsentReviewStep.m b/ResearchKit/Consent/ORKConsentReviewStep.m index 3a86c116ec..ee3ebf54f3 100644 --- a/ResearchKit/Consent/ORKConsentReviewStep.m +++ b/ResearchKit/Consent/ORKConsentReviewStep.m @@ -47,16 +47,6 @@ + (Class)stepViewControllerClass { return [ORKConsentReviewStepViewController class]; } -- (instancetype)initWithIdentifier:(NSString *)identifier signature:(ORKConsentSignature *)signature inDocument:(ORKConsentDocument *)consentDocument requiresScrollToBottom:(BOOL)requiresScrollToBottom { - self = [super initWithIdentifier:identifier]; - if (self) { - _consentDocument = consentDocument; - _signature = signature; - _requiresScrollToBottom = requiresScrollToBottom; - } - return self; -} - - (instancetype)initWithIdentifier:(NSString *)identifier signature:(ORKConsentSignature *)signature inDocument:(ORKConsentDocument *)consentDocument { self = [super initWithIdentifier:identifier]; if (self) { diff --git a/samples/ORKCatalog/ORKCatalog/Tasks/TaskListRow.swift b/samples/ORKCatalog/ORKCatalog/Tasks/TaskListRow.swift index 0bc93a5ac9..c009e3234e 100644 --- a/samples/ORKCatalog/ORKCatalog/Tasks/TaskListRow.swift +++ b/samples/ORKCatalog/ORKCatalog/Tasks/TaskListRow.swift @@ -1346,7 +1346,8 @@ enum TaskListRow: Int, CustomStringConvertible { */ let signature = consentDocument.signatures!.first - let reviewConsentStep = ORKConsentReviewStep(identifier: String(describing:Identifier.consentReviewStep), signature: signature, in: consentDocument, requiresScrollToBottom: true); + let reviewConsentStep = ORKConsentReviewStep(identifier: String(describing:Identifier.consentReviewStep), signature: signature, in: consentDocument) + reviewConsentStep.requiresScrollToBottom = true // In a real application, you would supply your own localized text. reviewConsentStep.title = NSLocalizedString("Consent Document", comment: "")