Configuring Personalization Options
Each Create Personalization has a list of configurable options. Create Personalizations subclass from VOPersonalizationOption
. On all VOPersonalizationOption
s there are the following options:
canAddMultiple
- Whether this option allows multiple items of this type. The only options that allow multiple are Photo, Video, Animated, Note.
carouselImage
- The image shown in the VOVoucherCreationViewController
carousel for this personalization option.
carouselText
- The text shown in the VOVoucherCreationViewController
carousel for this personalization option.
VOPersonalizationOption
s are immutable after creation. They are initialized with a VOPersonalizationOptionBuilder
to override any properties.
Example initialization
VOPhotoPersonalizationOption *option = [VOPhotoPersonalizationOption photoPersonalizationOptionWithBuilderBlock:^(VOPhotoPersonalizationOptionBuilder *builder) {
// set properties here
builder.canAddMultiple = NO; // property on all personalization options
builder.canUploadPhotos = NO; // property only on PhotoPersonalizationOption
builder.canAddGoogleImages = YES;
builder.canTakePhotos = YES;
builder.suggestedSearchTerms = @[@"one", @"two", @"three"];
}];
let option = VOPhotoPersonalizationOption(builderBlock:{(builder) in
// set properties here
builder!.canAddMultiple = false // property on all personalization options
builder!.canUploadPhotos = false // property only on PhotoPersonalizationOption
builder!.canAddGoogleImages = true
builder!.canTakePhotos = true
builder!.suggestedSearchTerms = ["one", "two", "three"]
})