FBAdChoicesView Class Reference
Inherits from | UIView |
Declared in | FBAdChoicesView.h |
Overview
@class FBAdChoicesView
@abstract FBAdChoicesView offers a simple way to display a sponsored or AdChoices icon.
Tasks
-
label
property -
backgroundShown
property -
expandable
property -
nativeAd
property -
corner
property -
viewController
property -
– initWithNativeAd:
-
– initWithNativeAd:expandable:
-
– initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:
-
– initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:expandable:
-
– initWithViewController:adChoicesIcon:adChoicesLinkURL:adChoicesText:attributes:expandable:
-
– updateFrameFromSuperview
-
– updateFrameFromSuperview:
Properties
backgroundShown
Determines whether the background mask is shown, or a transparent mask is used.
@property (nonatomic, assign, getter=isBackgroundShown) BOOL backgroundShown
Declared In
FBAdChoicesView.h
expandable
Determines whether the view can be expanded upon being tapped, or defaults to fullsize. Defaults to NO.
@property (nonatomic, assign, readonly, getter=isExpandable) BOOL expandable
Declared In
FBAdChoicesView.h
Instance Methods
initWithNativeAd:
@method
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd
Parameters
- nativeAd
The native ad to initialize with.
Discussion
@abstract Initialize this view with a given native ad. Configuration is pulled from the native ad.
Declared In
FBAdChoicesView.h
initWithNativeAd:expandable:
@method
- (instancetype)initWithNativeAd:(FBNativeAd *)nativeAd expandable:(BOOL)expandable
Parameters
- nativeAd
The native ad to initialize with.
- expandable
Controls whether view defaults to expanded or not, see property documentation
Discussion
@abstract Initialize this view with a given native ad. Configuration is pulled from the native ad.
Declared In
FBAdChoicesView.h
initWithViewController:adChoicesIcon:adChoicesLinkURL:adChoicesText:attributes:expandable:
@method
- (instancetype)initWithViewController:(nullable UIViewController *)viewController adChoicesIcon:(FBAdImage *)adChoicesIcon adChoicesLinkURL:(NSURL *)adChoicesLinkURL adChoicesText:(nullable NSString *)adChoicesText attributes:(nullable FBNativeAdViewAttributes *)attributes expandable:(BOOL)expandable
Parameters
- viewController
View controller to present the AdChoices webview from.
- adChoicesIcon
Native ad AdChoices icon.
- adChoicesLinkURL
Native ad AdChoices link URL.
- adChoicesText
Native ad AdChoices label.
- attributes
Attributes to configure look and feel.
- expandable
Controls whether view defaults to expanded or not, see property documentation
Discussion
@abstract Initialize this view with explicit parameters.
Declared In
FBAdChoicesView.h
initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:
@method
- (instancetype)initWithViewController:(nullable UIViewController *)viewController adChoicesIcon:(FBAdImage *)adChoicesIcon adChoicesLinkURL:(NSURL *)adChoicesLinkURL attributes:(nullable FBNativeAdViewAttributes *)attributes
Parameters
- viewController
View controller to present the AdChoices webview from.
- adChoicesIcon
Native ad AdChoices icon.
- adChoicesLinkURL
Native ad AdChoices link URL.
- attributes
Attributes to configure look and feel.
Discussion
@abstract Initialize this view with explicit parameters.
Declared In
FBAdChoicesView.h
initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:expandable:
@method
- (instancetype)initWithViewController:(nullable UIViewController *)viewController adChoicesIcon:(FBAdImage *)adChoicesIcon adChoicesLinkURL:(NSURL *)adChoicesLinkURL attributes:(nullable FBNativeAdViewAttributes *)attributes expandable:(BOOL)expandable
Parameters
- viewController
View controller to present the AdChoices webview from.
- adChoicesIcon
Native ad AdChoices icon.
- adChoicesLinkURL
Native ad AdChoices link URL.
- attributes
Attributes to configure look and feel.
- expandable
Controls whether view defaults to expanded or not, see property documentation
Discussion
@abstract Initialize this view with explicit parameters.
Declared In
FBAdChoicesView.h
updateFrameFromSuperview
@method
- (void)updateFrameFromSuperview
Discussion
@abstract Using the superview, this updates the frame of this view, positioning the icon in the top right corner by default.
Declared In
FBAdChoicesView.h
updateFrameFromSuperview:
@method
- (void)updateFrameFromSuperview:(UIRectCorner)corner
Parameters
- corner
The corner to display this view from.
Discussion
@abstract Using the superview, this updates the frame of this view, positioning the icon in the corner specified. UIRectCornerAllCorners not supported.
Declared In
FBAdChoicesView.h