FBAdChoicesView
เวอร์ชั่นที่ใหม่กว่าของคลาสนี้พร้อมแล้ว ตรวจสอบได้ เวอร์ชั่นล่าสุด

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

Superclass:UIView
Declared in:FBAdChoicesView.h
ทรัพย์สิน
backgroundShown

Determines whether the background mask is shown, or a transparent mask is used.

@property (nonatomic, assign, getter=isBackgroundShown) BOOL backgroundShown;
ให้คำรับรองไว้ใน: 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;
ให้คำรับรองไว้ใน: FBAdChoicesView.h
label

Access to the text label contained in this view.

@property (nonatomic, weak, readonly, nullable) UILabel *label;
ให้คำรับรองไว้ใน: FBAdChoicesView.h
วิธีการทันใจ
initWithNativeAd:

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

พารามิเตอร์คำอธิบาย
nativeAd

The native ad to initialize with.

- (instancetype) initWithNativeAd:(FBNativeAd *)nativeAd;
ให้คำรับรองไว้ใน: FBAdChoicesView.h
initWithNativeAd:expandable:

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

พารามิเตอร์คำอธิบาย
nativeAd

The native ad to initialize with.

expandable

Controls whether view defaults to expanded or not, see property documentation

- (instancetype)
initWithNativeAd: (FBNativeAd *)nativeAd
expandable: (BOOL)expandable;
ให้คำรับรองไว้ใน: FBAdChoicesView.h
initWithViewController:adChoicesIcon:adChoicesLinkURL:adChoicesText:attributes:expandable:

Initialize this view with explicit 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

- (instancetype)
initWithViewController: (nullable UIViewController *)viewController
adChoicesIcon: (FBAdImage *)adChoicesIcon
adChoicesLinkURL: (NSURL *)adChoicesLinkURL
adChoicesText: (nullable NSString*)adChoicesText
attributes: (nullable FBNativeAdViewAttributes *)attributes
expandable: (BOOL)expandable
NS_DESIGNATED_INITIALIZER;
ให้คำรับรองไว้ใน: FBAdChoicesView.h
initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:

Initialize this view with explicit 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.

- (instancetype)
initWithViewController: (nullable UIViewController *)viewController
adChoicesIcon: (FBAdImage *)adChoicesIcon
adChoicesLinkURL: (NSURL *)adChoicesLinkURL
attributes: (nullable FBNativeAdViewAttributes *)attributes;
ให้คำรับรองไว้ใน: FBAdChoicesView.h
initWithViewController:adChoicesIcon:adChoicesLinkURL:attributes:expandable:

Initialize this view with explicit 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

- (instancetype)
initWithViewController: (nullable UIViewController *)viewController
adChoicesIcon: (FBAdImage *)adChoicesIcon
adChoicesLinkURL: (NSURL *)adChoicesLinkURL
attributes: (nullable FBNativeAdViewAttributes *)attributes
expandable: (BOOL)expandable;
ให้คำรับรองไว้ใน: 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;
ให้คำรับรองไว้ใน: FBAdChoicesView.h
updateFrameFromSuperview:

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

พารามิเตอร์คำอธิบาย
corner

The corner to display this view from.

- (void) updateFrameFromSuperview:(UIRectCorner)corner;
ให้คำรับรองไว้ใน: FBAdChoicesView.h