VOCreationItemView
@interface VOCreationItemView : UIView
VOCreationItemView is the view that is dropped into the EnvelopeView of the VoucherCreationViewController.
It represents a chosen PersonalizationOption object by the creating User.
-
The type of personalization the
VOCreationItemViewrepresents.Declaration
Objective-C
@property (readonly, nonatomic) VOPersonalizationType type;Swift
var type: VOPersonalizationType { get } -
A subtype for the personalization to avoid ambiguity when two different
VOCreationItemViews have the same type. If no subType is required, pass 0 for this value.Declaration
Objective-C
@property (readonly, nonatomic) NSInteger subType;Swift
var subType: Int { get } -
An id for the
VOCreationItemViewused to help identify the personalization object associated with it.Declaration
Objective-C
@property (readonly, nonatomic) NSInteger itemId;Swift
var itemId: Int { get } -
Whether this
VOCreationItemViewis editable.Declaration
Objective-C
@property (readonly, nonatomic) BOOL isEditable;Swift
var isEditable: Bool { get } -
Whether this
VOCreationItemViewcan be removed from the envelope.Declaration
Objective-C
@property (readonly, nonatomic) BOOL isRemovable;Swift
var isRemovable: Bool { get } -
The border width of the
VOCreationItemView.Declaration
Objective-C
@property (readonly, nonatomic) CGFloat borderWidth;Swift
var borderWidth: CGFloat { get } -
The border color of the
VOCreationItemView.Declaration
Objective-C
@property (readonly, nonatomic) UIColor *borderColor;Swift
var borderColor: UIColor! { get } -
A url for a remote image that should be displayed in the
VOCreationItemView.Declaration
Objective-C
@property (readonly, nonatomic) NSString *imageUrl;Swift
var imageUrl: String! { get } -
Undocumented
Declaration
Objective-C
@property (nonatomic, readonly) UIImage *imageSwift
var image: UIImage! { get } -
Initializer for creating a
VOCreationItemViewfrom a local image.Declaration
Objective-C
+ (instancetype)creationItemViewWithType:(VOPersonalizationType)type subType:(NSInteger)subType itemId:(NSInteger)itemId isEditable:(BOOL)isEditable isRemovable:(BOOL)isRemovable image:(UIImage *)image borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor;Swift
convenience init!(type: VOPersonalizationType, subType: Int, itemId: Int, isEditable: Bool, isRemovable: Bool, image: UIImage!, borderWidth: CGFloat, borderColor: UIColor!)Parameters
type- The type of personalization.
subType- The subtype of the personalization - optional parameter, default is 0.
itemId- A unique identifier representing the personalization object, set by the Vouchr Server.
isEditable- Whether or not the item can be modified from the edit screen.
isRemovable- Determines whether or not the item can be deleted from the
Voucherduring the editing stage.image- The image to be shown.
borderWidth- How thick the border surrounding the image should be.
borderColor- The color of the border surrounding the image.
Return Value
Instance of
VOCreationItemView. -
Initializer for creating a
VOCreationItemViewfrom a remote image url.Declaration
Objective-C
+ (instancetype)creationItemViewWithType:(VOPersonalizationType)type subType:(NSInteger)subType itemId:(NSInteger)itemId isEditable:(BOOL)isEditable isRemovable:(BOOL)isRemovable imageUrl:(NSString *)imageUrl borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor;Swift
convenience init!(type: VOPersonalizationType, subType: Int, itemId: Int, isEditable: Bool, isRemovable: Bool, imageUrl: String!, borderWidth: CGFloat, borderColor: UIColor!)Parameters
type- The type of personalization.
subType- The subtype of the personalization - optional parameter, default is 0.
itemId- A unique identifier representing the personalization object, set by the Vouchr Server.
isEditable- Whether or not the item can be modified from the edit screen.
isRemovable- Determines whether or not the item can be deleted from the
Voucherduring the editing stage.imageUrl- The remote url for the image to be shown.
borderWidth- How thick the border surrounding the image should be.
borderColor- The color of the border surrounding the image.
Return Value
Instance of
VOCreationItemView. -
+creationItemViewWithType:subType:itemId:isEditable:isRemovable:viewToRenderAsImage:borderWidth:borderColor:Initializer for creating a
VOCreationItemViewfrom a view.Declaration
Objective-C
+ (instancetype)creationItemViewWithType:(VOPersonalizationType)type subType:(NSInteger)subType itemId:(NSInteger)itemId isEditable:(BOOL)isEditable isRemovable:(BOOL)isRemovable viewToRenderAsImage:(UIView *)viewToRender borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor;Swift
convenience init!(type: VOPersonalizationType, subType: Int, itemId: Int, isEditable: Bool, isRemovable: Bool, viewToRenderAsImage viewToRender: UIView!, borderWidth: CGFloat, borderColor: UIColor!)Parameters
type- The type of personalization.
subType- The subtype of the personalization - optional parameter, default is 0.
itemId- A unique identifier representing the personalization object, set by the Vouchr Server.
isEditable- Whether or not the item can be modified from the edit screen.
isRemovable- Determines whether or not the item can be deleted from the
Voucherduring the editing stage.viewToRender- The view that will be rendered as an image.
borderWidth- How thick the border surrounding the image should be.
borderColor- The color of the border surrounding the image.
Return Value
Instance of
VOCreationItemView. -
Creates a film strip frame for video thumbnails.
Declaration
Objective-C
+ (UIView *)filmStripFrameWithThumbnail:(UIImage *)thumbnail isYoutube:(BOOL)isYoutube;Swift
class func filmStripFrame(withThumbnail thumbnail: UIImage!, isYoutube: Bool) -> UIView!Parameters
thumbnail- The image used to represent a video.
isYoutube- Determines whether the video is a
YoutubeMedia. If the video is aYoutubeMedia, a red Youtube play button is added as an overlay to the video thumbnail. Otherwise, a white play button is applied. -
Updates title text.
Declaration
Objective-C
- (void)updateWebViewText:(NSString *)title;Swift
func updateWebViewText(_ title: String!)Parameters
title- The new title to be shown.
-
Updates thumbnail by reloading using a new url string.
Declaration
Objective-C
- (void)setupWithUrlString:(NSString *)urlString;Swift
func setup(withUrlString urlString: String!)Parameters
urlString- The new url string to display the new thumbnail.
-
Undocumented
Declaration
Objective-C
- (VOAnimatedTitleView *)titleView;Swift
func titleView() -> VOAnimatedTitleView!
View on GitHub
VOCreationItemView Class Reference