FBAdChoicesView
A more recent version of this class is available. Check out the latest version.

FBAdChoicesView offers a simple way to display a sponsored or AdChoices icon.

Inherits from:UIView
Declared in:FBAdChoicesView.h
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
label

Access to the text label contained in this view.

@property (nonatomic, weak, readonly) UILabel *label;
Declared In: FBAdChoicesView.h
Instance Methods
initWithNativeAd:

Initialize this view with a given native ad. Configuration is pulled from the native ad.

ParameterDescription
nativeAd

The native ad to initialize with.

- (instancetype) initWithNativeAd:(FBNativeAd *)nativeAd;
Declared In: FBAdChoicesView.h
initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:

Initialize this view with explicit parameters.

ParameterDescription
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.

- (instancetype)
initWithViewController: (UIViewController *)viewController
adChoicesIcon: (FBAdImage *)adChoicesIcon
adChoicesLinkURL: (NSURL *)adChoicesLinkURL
attributes: (FBNativeAdViewAttributes *)attributes
NS_DESIGNATED_INITIALIZER;
Declared In: FBAdChoicesView.h
updateFrameFromSuperview

Using the superview, this updates the frame of this view, positioning the icon in the top right corner by default.

- (void) updateFrameFromSuperview;
Declared In: FBAdChoicesView.h
updateFrameFromSuperview:

Using the superview, this updates the frame of this view, positioning the icon in the corner specified. UIRectCornerAllCorners not supported.

ParameterDescription
corner

The corner to display this view from.

- (void) updateFrameFromSuperview:(UIRectCorner)corner;
Declared In: FBAdChoicesView.h