PhotoPersonalizationOption
@interface PhotoPersonalizationOption : PersonalizationOption
PhotoPersonalizationOption represents a Voucher
customization that allows the user to add images to their Voucher
. Instantiate a PhotoPersonalizationOption and include it in the VoucherCreationViewController
setup if you would like the user to be able to add photos.
*
-
Allows the photo to be edited after it is selected.
Note
Default is YES.Declaration
Objective-C
@property (readonly, nonatomic) BOOL allowPhotoEditing;
Swift
var allowPhotoEditing: Bool { get }
-
Allows the user to add their own photos from their camera roll to the
Voucher
.Note
Default is YES.Declaration
Objective-C
@property (readonly, nonatomic) BOOL canUploadPhotos;
Swift
var canUploadPhotos: Bool { get }
-
Allows the user to add photos taken from their camera to the
Voucher
.Note
Default is YES.Declaration
Objective-C
@property (readonly, nonatomic) BOOL canTakePhotos;
Swift
var canTakePhotos: Bool { get }
-
Allows the user to add photos from Google image search to the
Voucher
.Note
Default is YES.Declaration
Objective-C
@property (readonly, nonatomic) BOOL canAddGoogleImages;
Swift
var canAddGoogleImages: Bool { get }
-
The colors of the image tiles that contain the images to choose from. The colors will only be visible before during the loading phase, before the image thumbnail has finished downloading.
Note
Default list is: Red: #E86963, Orange: #FFAD76, Yellow: #FFDA67, Green: #77E097, Teal: #2FCCAD, Navy Blue: #509CDE, Purple: #9372FF If you do not want background colors, pass in an empty array.Declaration
Objective-C
@property (readonly, strong, nonatomic) NSArray<UIColor *> *imageBackgroundColors;
Swift
var imageBackgroundColors: [UIColor]! { get }
-
A list of suggested search terms shown to a user in the Google image search screen. If no list of suggested search terms is given, the default list from the Vouchr Server will be used.
Note
Default is nil.Declaration
Objective-C
@property (readonly, strong, nonatomic) NSArray<NSString *> *suggestedSearchTerms;
Swift
var suggestedSearchTerms: [String]! { get }
-
The maximum number of images returned by the
SearchAgent
. Set to zero to enable paginated fetches.Note
Default is 0.Declaration
Objective-C
@property (readonly, nonatomic) NSInteger maxSearchResults;
Swift
var maxSearchResults: Int { get }
-
Whether the user is allowed to type in the Google Images search bar. If this is disabled, the user will only be able to search using the
suggestedSearchTerms
.Note
Default is YES.Declaration
Objective-C
@property (readonly, nonatomic) BOOL allowUserCustomSearch;
Swift
var allowUserCustomSearch: Bool { get }
-
Theme used on the
FullScreenCameraViewController
.Note
Default isVouchrConfig
defaultTheme.Declaration
Objective-C
@property (readwrite, strong, nonatomic) VouchrTheme *takeAPhotoVouchrTheme;
Swift
var takeAPhotoVouchrTheme: VouchrTheme! { get set }
-
Theme used on the
VouchrImageMediaSearchViewController
.Note
Default isVouchrConfig
defaultTheme.Declaration
Objective-C
@property (readwrite, strong, nonatomic) VouchrTheme *imageSelectorVouchrTheme;
Swift
var imageSelectorVouchrTheme: VouchrTheme! { get set }
-
Theme used on the
FullScreenImageEditViewController
.Note
Default isVouchrConfig
defaultTheme.Declaration
Objective-C
@property (readwrite, strong, nonatomic) VouchrTheme *editImageVouchrTheme;
Swift
var editImageVouchrTheme: VouchrTheme! { get set }
-
Creates a Photo personalization option with the values from the builder. Internally calls initWithBuilder.
Declaration
Objective-C
+ (instancetype)photoPersonalizationOptionWithBuilderBlock: (void (^)(PhotoPersonalizationOptionBuilder *))builderBlock;
Swift
convenience init!(builderBlock: ((PhotoPersonalizationOptionBuilder?) -> Void)!)
Parameters
builderBlock
- the block containing the builder to construct the personalization option. Set the desired properties on the builder within the block.
Return Value
instancetype - PhotoPersonalizationOption object containing the properties specified in the builder.