iOS SDK Version
FBAdChoicesView
Objective-C
@interfaceFBAdChoicesView:UIView
Swift
classFBAdChoicesView:UIView
FBAdChoicesView offers a simple way to display a sponsored or AdChoices icon.
- Access to the text label contained in this view.
Declaration
Objective-C@property(nonatomic,weak,readonly,nullable)UILabel*label;
Swiftweakvarlabel:UILabel?{get}
- Determines whether the background mask is shown, or a transparent mask is used.
Declaration
Objective-C@property(nonatomic,assign,unsafe_unretained,readwrite,getter=isBackgroundShown)BOOLbackgroundShown;
SwiftvarisBackgroundShown:Bool{getset}
- Determines whether the view can be expanded upon being tapped, or defaults to fullsize. Defaults to NO.
Declaration
Objective-C@property(nonatomic,readonly,getter=isExpandable)BOOLexpandable;
SwiftvarisExpandable:Bool{get}
- The native ad that provides AdChoices info, such as the image url, and click url. Setting this updates the nativeAd.
Declaration
Objective-C@property(nonatomic,weak,nullable)FBNativeAdBase*nativeAd;
SwiftweakvarnativeAd:FBNativeAdBase?{getset}
- Affects background mask rendering. Setting this property updates the rendering.
Declaration
Objective-C@property(nonatomic)UIRectCornercorner;
Swiftvarcorner:UIRectCorner{getset}
- Affects background mask rendering. Setting this property updates the rendering.
Declaration
Objective-C@property(nonatomic)UIEdgeInsetsinsets;
Swiftvarinsets:UIEdgeInsets{getset}
- The view controller to present the ad choices info from. If nil, the top view controller is used.
Declaration
Objective-C@property(nonatomic,weak,null_resettable)UIViewController*rootViewController;
SwiftweakvarrootViewController:UIViewController!{getset}
- The tag for AdChoices view. It always returns FBNativeAdViewTagChoicesIcon.
Declaration
Objective-C@property(nonatomic,readonly)FBNativeAdViewTagnativeAdViewTag;
SwiftvarnativeAdViewTag:FBNativeAdViewTag{get}
- Initialize this view with a given native ad. Configuration is pulled from the native ad.
Declaration
Objective-C-(nonnullinstancetype)initWithNativeAd:(nonnullFBNativeAdBase*)nativeAd;
Swiftinit(nativeAd:FBNativeAdBase)
Parameters
- Initialize this view with a given native ad. Configuration is pulled from the native ad.
Declaration
Objective-C-(nonnullinstancetype)initWithNativeAd:(nonnullFBNativeAdBase*)nativeAdexpandable:(BOOL)expandable;
Swiftinit(nativeAd:FBNativeAdBase,expandable:Bool)
Parameters
- Initialize this view with a given native ad. Configuration is pulled from the native ad.
Declaration
Objective-C-(nonnullinstancetype)initWithNativeAd:(nonnullFBNativeAdBase*)nativeAdexpandable:(BOOL)expandableattributes:(nullableFBNativeAdViewAttributes*)attributes;
Swiftinit(nativeAd:FBNativeAdBase,expandable:Bool,attributes:FBNativeAdViewAttributes?)
Parameters
- Using the superview, this updates the frame of this view, positioning the icon in the top right corner by default.
Declaration
Objective-C-(void)updateFrameFromSuperview;
SwiftfuncupdateFrameFromSuperview()
- Using the superview, this updates the frame of this view, positioning the icon in the corner specified. UIRectCornerAllCorners not supported.
Declaration
Objective-C-(void)updateFrameFromSuperview:(UIRectCorner)corner;
SwiftfuncupdateFrame(fromSuperviewcorner:UIRectCorner)
Parameters
- Using the superview, this updates the frame of this view, positioning the icon in the corner specified. UIRectCornerAllCorners not supported.
Declaration
Objective-C-(void)updateFrameFromSuperview:(UIRectCorner)cornerinsets:(UIEdgeInsets)insets;
SwiftfuncupdateFrame(fromSuperviewcorner:UIRectCorner,insets:UIEdgeInsets)
Parameters