Skip to content

Commit

Permalink
reverted back to original initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
eschramm committed Jul 18, 2018
1 parent d853c54 commit fa23b2a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
24 changes: 3 additions & 21 deletions ResearchKit/Consent/ORKConsentReviewStep.h
Expand Up @@ -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;
Expand Down
10 changes: 0 additions & 10 deletions ResearchKit/Consent/ORKConsentReviewStep.m
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion samples/ORKCatalog/ORKCatalog/Tasks/TaskListRow.swift
Expand Up @@ -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: "")
Expand Down

0 comments on commit fa23b2a

Please sign in to comment.