ORKConsentSection Class Reference

Inherits from NSObject
Conforms to NSCopying
NSSecureCoding
Declared in ORKConsentSection.h

The ORKConsentSection class represents one section in a consent document. Each ORKConsentSection object (apart from those of type ORKConsentSectionTypeOnlyInDocument) corresponds to a page in a visual consent step, or a section in the document reviewed in consent review step.

If you initialize a consent section with one of the defined section types, you get a prepopulated title, a default image, and animation (when appropriate). You can override these properties or you can use the ORKConsentSectionTypeCustom type to avoid any prepopulation.

If you provide content for the ORKConsentSection object, be sure to use localized content.

– initWithType:

Returns an initialized consent section using the specified type.

- (instancetype)initWithType:(ORKConsentSectionType)type

Parameters

type

The consent section type.

Discussion

This method populates the title and summary for all types except for ORKConsentSectionTypeCustom and ORKConsentSectionTypeOnlyInDocument.

Declared In

ORKConsentSection.h

  type

The type of section. (read-only)

@property (nonatomic, readonly) ORKConsentSectionType type

Discussion

The value of this property indicates whether a predefined image, title, and animation are present.

Declared In

ORKConsentSection.h

  title

The title of the consent section in a localized string.

@property (nonatomic, copy, nullable) NSString *title

Discussion

The title is displayed as a scene title in the animated consent sequence and is also included in the PDF file, but it can be overridden by setting formalTitle. The title is prefilled unless the type is ORKConsentSectionTypeCustom or ORKConsentSectionTypeOnlyInDocument.

Declared In

ORKConsentSection.h

  formalTitle

The formal title of the section in a localized string, for use in the legal document.

@property (nonatomic, copy, nullable) NSString *formalTitle

Discussion

If the value of this property is nil, the value of title is used in the legal document instead.

Declared In

ORKConsentSection.h

  summary

A short summary of the content in a localized string.

@property (nonatomic, copy, nullable) NSString *summary

Discussion

The summary is displayed as description text in the animated consent sequence. The summary should be limited in length, so that the consent can be reliably displayed on smaller screens.

Declared In

ORKConsentSection.h

  content

The content of the section in a localized string.

@property (nonatomic, copy, nullable) NSString *content

Discussion

In a consent review step or in PDF file generation, the string is printed as the section’s content. The string is also displayed as Learn More content in a visual consent step.

This property is never prepopulated based on the value of type. If both content and htmlContent are non-nil, the value of the htmlContent property is used.

Declared In

ORKConsentSection.h

  htmlContent

The HTML content used to override the content property if additional formatting is needed. The content should be localized.

@property (nonatomic, copy, nullable) NSString *htmlContent

Discussion

In cases where plain text content is not sufficient to convey important details during the consent process, you can provide HTML content in this property. When you do this, the htmlContent property takes precedence over the content property.

In a consent review step or in PDF file generation, the value of this property is printed as the section’s content; in a visual consent step, the content is displayed as Learn More content.

Declared In

ORKConsentSection.h

  contentURL

The NSURL used to override the ‘htmlContent’ and ‘consent’ property if a document should be required.

@property (nonatomic, copy, nullable) NSURL *contentURL

Discussion

This property is used to display a document when required by an authortity.

Declared In

ORKConsentSection.h

  omitFromDocument

When set to YES, the section is omitted in a consent review step or in PDF file generation. This property is NO by default.

@property (nonatomic) BOOL omitFromDocument

Declared In

ORKConsentSection.h

  customImage

A custom illustration for the consent.

@property (nonatomic, copy, nullable) UIImage *customImage

Discussion

The custom image can override the image associated with any of the predefined section types for an ORKVisualConsentStep object. It is ignored for a consent review step and for PDF generation.

The image is used in template rendering mode, and is tinted using the tint color.

Declared In

ORKConsentSection.h

  customLearnMoreButtonTitle

A custom Learn More button title in a localized string.

@property (nonatomic, copy, nullable) NSString *customLearnMoreButtonTitle

Discussion

The predefined section types have localized descriptive Learn More button titles for a visual consent step. When this property is not nil, it overrides that default text.

Declared In

ORKConsentSection.h

  customAnimationURL

A file URL that specifies a custom transition animation video.

@property (nonatomic, copy, nullable) NSURL *customAnimationURL

Discussion

Animations of the illustration between one screen and the next are provided by default for transitions between consecutive section type codes. Custom sections and out-of-order transitions may require custom animations.

The animation loaded from the file URL is played aspect fill in the illustration area for forward transitions only. The video is rendered in template mode, with white treated as if it were transparent.

Declared In

ORKConsentSection.h