-
Sets the view to be an ellipse.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL rounded;
Swift
var rounded: Bool { get set }
-
The image displayed in the view.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) UIImage *_Nullable image;
Swift
var image: UIImage? { get set }
-
The image scale mode.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) UIViewContentMode contentMode;
Swift
var contentMode: UIView.ContentMode { get set }
-
Color of the view.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) UIColor *_Nullable backgroundColor;
Swift
var backgroundColor: UIColor? { get set }
-
Downloads and sets the image specified by the url.
Declaration
Objective-C
- (void)setupWithUrlString:(NSString *_Nullable)imageUrlString;
Swift
func setup(withUrlString imageUrlString: String?)
Parameters
imageUrlString
- The web URL of the image to be downloaded.
-
Downloads and sets the image specified by the url with additional callbacks.
Declaration
Objective-C
- (void)setupWithUrlString:(NSString *_Nullable)imageUrlString onImageDownloadCompletion:(void (^_Nullable)(UIImage *_Nullable))completion imageDownloadFailure:(void (^_Nullable)(NSError *_Nullable))onFailure;
Swift
func setup(withUrlString imageUrlString: String?, onImageDownloadCompletion completion: ((UIImage?) -> Void)?, imageDownloadFailure onFailure: ((Error?) -> Void)? = nil)
Parameters
imageUrlString
- The web URL of the image to be downloaded.
completion
- The block to be executed upon download completion.
onFailure
- The block to be executed upon download failure.
-
Downloads and sets the image specified by the url. This view will be styled for a profile picture use. It will be round and contain a white border.
Declaration
Objective-C
- (void)setupAsAvatarWithUrlString:(NSString *_Nullable)imageUrlString;
Swift
func setupAsAvatar(withUrlString imageUrlString: String?)
Parameters
imageUrlString
- The web URL of the image to be downloaded.
-
Downloads and sets the image specified by the url. This view will be styled for a profile picture use. It will be round and contain a white border.
Declaration
Objective-C
- (void)setupAsAvatarWithImage:(nonnull UIImage *)image;
Swift
func setupAsAvatar(with image: UIImage)
Parameters
image
- The image to be displayed as the profile picture.
-
Downloads and sets the image specified by the url. This view will be styled for a profile picture use. It will be round and contain a white border.
Declaration
Objective-C
- (void)setupAsAvatarWithUrlString:(NSString *_Nullable)imageUrlString borderWidth:(CGFloat)borderWidth;
Swift
func setupAsAvatar(withUrlString imageUrlString: String?, borderWidth: CGFloat)
Parameters
imageUrlString
- The web URL of the image to be downloaded.
borderWidth
- The width of the profile picture border in pixels.
-
Toggles anti-aliasing on or off.
Note
anti-aliasing is off by default, turn on if edges are pixelated (usually occurs when view is rotated).Declaration
Objective-C
- (void)setAllowsEdgeAntialiasing:(BOOL)allowsEdgeAntialiasing;
Swift
func setAllowsEdgeAntialiasing(_ allowsEdgeAntialiasing: Bool)
Parameters
allowsEdgeAntialiasing
- Specifies whether anti-aliasing is on or off.
-
Cancels the download operation.
Declaration
Objective-C
- (void)cancelCurrentImageRequest;
Swift
func cancelCurrentImageRequest()
-
Resizes image inside the imageView and applies borders around the resized imageView.
Declaration
Objective-C
- (void)applyBorderAndAspectFitInsideFrame:(CGRect)bounds borderWidth:(CGFloat)borderWidth borderColor:(nonnull UIColor *)borderColor;
Swift
func applyBorderAndAspectFit(insideFrame bounds: CGRect, borderWidth: CGFloat, borderColor: UIColor)
Parameters
borderWidth
- The width of the border to be applied to the imageView.
borderColor
- The color of the border to be applied to the imageView.
-
Removes the border around an imageView.
Declaration
Objective-C
- (void)removeBorder;
Swift
func removeBorder()
-
Updates the text displayed in
VouchrWKWebView
with the parameter passed in.Declaration
Objective-C
- (void)updateWebViewText:(nonnull NSString *)title;
Swift
func updateWebViewText(_ title: String)
Parameters
title
- The new title to be displayed in the webView.
-
Updates the contentView to display
VouchrWKWebView
.Declaration
Objective-C
- (void)updateContentViewWithWebView:(nonnull VouchrWKWebView *)webView;
Swift
func updateContentView(with webView: VouchrWKWebView)
Parameters
webView
- The webView to be displayed.