iOS SDK Version

FBAdImage

@interfaceFBAdImage:NSObject
Represents an image creative.
  • Typed access to the image url.

    Declaration

    Objective-C
    @property(nonatomic,copy,readonly)NSURL*_Nonnullurl;
    Swift
    varurl:URL{get}
  • Typed access to the image width.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readonly)NSIntegerwidth;
    Swift
    varwidth:Int{get}
  • Typed access to the image height.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readonly)NSIntegerheight;
    Swift
    varheight:Int{get}
  • This is a method to initialize an FBAdImage.

    Declaration

    Objective-C
    -(nonnullinstancetype)initWithURL:(nonnullNSURL*)urlwidth:(NSInteger)widthheight:(NSInteger)height;
    Swift
    init(url:URL,width:Int,height:Int)

    Parameters

  • Loads an image from self.url over the network, or returns the cached image immediately.

    Declaration

    Objective-C
    -(void)loadImageAsyncWithBlock:(nullablevoid(^)(UIImage*_Nullable))block;
    Swift
    funcloadAsync(block:((UIImage?)->Void)?=nil)

    Parameters