PersonalizationOption

@interface PersonalizationOption : NSObject

PersonalizationOption represents a Voucher customization which will be available to the user in the VoucherCreationViewController. A PersonalizationOption should exist for each personalization the user allowed access to.

Note

PersonalizationOption is used as a base class, instantiate an existing subclass (ex. PhotoPersonalizationOption) for use.

Note

Any properties that are not set will have default values set.
  • The type of the personalization option.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PersonalizationType type;

    Swift

    var type: PersonalizationType { get }
  • Specifies whether more than one personalization of this type can be added. The options that support multiple additions are: Photo, Video, Animated, Note

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL canAddMultiple;

    Swift

    var canAddMultiple: Bool { get }
  • The image that appears in the carousel above the envelope, that the user will browse and select - each personalization type has a default image provided, unique to that type.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) UIImage *carouselImage;

    Swift

    var carouselImage: UIImage! { get }
  • The description that appears in the carousel below the carouselImage - default text is provided and is based on the personalization type

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSString *carouselText;

    Swift

    var carouselText: String! { get }
  • The text that shows up on top of the carouselImage - default is nil

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSString *carouselOverlappingText;

    Swift

    var carouselOverlappingText: String! { get }
  • The title that appears in an action sheet view controller when there are multiple options.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSString *actionSheetTitleText;

    Swift

    var actionSheetTitleText: String! { get }
  • The background color that appears behind the carouselImage - default is clear

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) UIColor *carouselBackgroundColor;

    Swift

    var carouselBackgroundColor: UIColor! { get }
  • Theme manager used to style the personalization screen associated with this Personalization Option - default is nil. *

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) VouchrTheme *vouchrTheme;

    Swift

    var vouchrTheme: VouchrTheme! { get }
  • Creates a personalization option with the values from the builder. Internally calls initWithBuilder

    Declaration

    Objective-C

    + (instancetype)personalizationOptionWithBuilder:
        (void (^)(PersonalizationOptionBuilder *))builderBlock;

    Swift

    convenience init!(builder builderBlock: ((PersonalizationOptionBuilder?) -> Void)!)

    Parameters

    builderBlock

    - the block containing the builder object. Set the desired properties on the supplied builder within the block.

    Return Value

    instancetype - PersonalizationOption object containing the properties set on the builder.

  • Creates a personalization option with the values from the builder. Default initializer.

    Declaration

    Objective-C

    - (instancetype)initWithBuilder:(PersonalizationOptionBuilder *)builder;

    Swift

    init!(builder: PersonalizationOptionBuilder!)

    Parameters

    builder

    - The builder block with specified values for each property.

    Return Value

    instancetype - PersonalizationOption object containing the properties set in the builder.