iOS SDK Version

FBAdImage

Objective-C
@interfaceFBAdImage:NSObject
Swift
classFBAdImage: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,readonly)NSIntegerwidth;
    Swift
    varwidth:Int{get}
  • Typed access to the image height.

    Declaration

    Objective-C
    @property(nonatomic,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