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 -
– initWithNativeAd:
-
– initWithNativeAd:expandable:
-
– initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:
-
– initWithViewController:adChoicesIcon:adChoicesLinkURL: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
Instance Methods
initWithNativeAd:
@method
- (nonnull instancetype)initWithNativeAd:(nonnull 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
- (nonnull instancetype)initWithNativeAd:(nonnull 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:attributes:
@method
- (nonnull instancetype)initWithViewController:(nonnull UIViewController *)viewController adChoicesIcon:(nonnull FBAdImage *)adChoicesIcon adChoicesLinkURL:(nonnull 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
- (nonnull instancetype)initWithViewController:(nonnull UIViewController *)viewController adChoicesIcon:(nonnull FBAdImage *)adChoicesIcon adChoicesLinkURL:(nonnull 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