iOS SDK Version

FBAdChoicesView

@interfaceFBAdChoicesView: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;
    Swift
    weakvarlabel: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;
    Swift
    varisBackgroundShown:Bool{getset}
  • Determines whether the view can be expanded upon being tapped, or defaults to fullsize. Defaults to NO.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readonly,getter=isExpandable)BOOLexpandable;
    Swift
    varisExpandable: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,readwrite,nullable)FBNativeAdBase*nativeAd;
    Swift
    weakvarnativeAd:FBNativeAdBase?{getset}
  • Affects background mask rendering. Setting this property updates the rendering.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readwrite)UIRectCornercorner;
    Swift
    varcorner:UIRectCorner{getset}
  • Affects background mask rendering. Setting this property updates the rendering.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readwrite)UIEdgeInsetsinsets;
    Swift
    varinsets: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,readwrite,null_resettable)UIViewController*rootViewController;
    Swift
    weakvarrootViewController:UIViewController!{getset}
  • The tag for AdChoices view. It always returns FBNativeAdViewTagChoicesIcon.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readonly)FBNativeAdViewTagnativeAdViewTag;
    Swift
    varnativeAdViewTag:FBNativeAdViewTag{get}
  • Initialize this view with a given native ad. Configuration is pulled from the native ad.

    Declaration

    Objective-C
    -(nonnullinstancetype)initWithNativeAd:(nonnullFBNativeAdBase*)nativeAd;
    Swift
    init(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;
    Swift
    init(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;
    Swift
    init(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;
    Swift
    funcupdateFrameFromSuperview()
  • 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;
    Swift
    funcupdateFrame(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;
    Swift
    funcupdateFrame(fromSuperviewcorner:UIRectCorner,insets:UIEdgeInsets)

    Parameters