SASViewAsset
Objective-C
@interface SASViewAsset : NSObject
Swift
class SASViewAsset : NSObject
Object representing all the assets linked to a view, typically a subview of a native ad.
-
The view representing this asset if any, nil otherwise.
Declaration
Objective-C
@property (readonly, nullable) UIView *view;
Swift
var view: UIView? { get }
-
The URL representing this asset if any, nil otherwise.
Declaration
Objective-C
@property (readonly, nullable) NSURL *url;
Swift
var url: URL? { get }
-
The width of the asset if available, nil otherwise.
Declaration
Objective-C
@property (readonly, nullable) NSNumber *width;
Swift
var width: NSNumber? { get }
-
The height of the asset if available, nil otherwise.
Declaration
Objective-C
@property (readonly, nullable) NSNumber *height;
Swift
var height: NSNumber? { get }
-
Initialize a new instance of SASViewAsset.
Note
A view asset must have at least a view or an URL, otherwise this initializer will return nil.
Declaration
Objective-C
- (nullable instancetype)initWithView:(nullable UIView *)view url:(nullable NSURL *)url width:(nullable NSNumber *)width height:(nullable NSNumber *)height;
Swift
init?(view: UIView?, url: URL?, width: NSNumber?, height: NSNumber?)
Parameters
view
The view representing this asset if any, nil otherwise.
url
The URL representing this asset if any, nil otherwise.
width
The width of the asset if available, nil otherwise.
height
The height of the asset if available, nil otherwise.
Return Value
An initialized instance of SASViewAsset