IMBanner Class Reference
Inherits from | UIView |
---|---|
Declared in | IMBanner.h |
Overview
- Class to integrate banner ads in your application *
- Adding banner ads is demonstrated in the code fragment below
Implement the following in the viewcontroller
IMBanner *bannerView = [[IMBanner alloc] initWithFrame:CGRectMake(0, 50, 320, 50) placementId:11203280001]; [self.view addSubview:self.bannerView]; [self.bannerView load];
The code snippet above demonstrates a dead simple integration. Your application code can additionally listen for lifecycle events on the banner ad by implementing the IMBannerDelegate.
delegate
The delegate for the banner to notify of events.
@property (nonatomic, weak) id<IMBannerDelegate> delegate
Discussion
The delegate for the banner to notify of events.
Declared In
IMBanner.h
refreshInterval
The refresh interval for the banner specified in seconds.
@property (nonatomic) NSInteger refreshInterval
Discussion
The refresh interval for the banner specified in seconds.
Declared In
IMBanner.h
keywords
A free form set of keywords, separated by ‘,’ to be sent with the ad request. E.g: “sports,cars,bikes”
@property (nonatomic, strong) NSString *keywords
Discussion
A free form set of keywords, separated by ‘,’ to be sent with the ad request. E.g: “sports,cars,bikes”
Declared In
IMBanner.h
extras
Any additional information to be passed to InMobi.
@property (nonatomic, strong) NSDictionary *extras
Discussion
Any additional information to be passed to InMobi.
Declared In
IMBanner.h
placementId
The placement ID for this banner.
@property (nonatomic) long long placementId
Discussion
The placement ID for this banner.
Declared In
IMBanner.h
transitionAnimation
The transition animation to be performed between refreshes.
@property (nonatomic) UIViewAnimationTransition transitionAnimation
Discussion
The transition animation to be performed between refreshes.
Declared In
IMBanner.h
creativeId
A unique identifier for the creative.
@property (nonatomic, strong, readonly) NSString *creativeId
Discussion
A unique identifier for the creative.
Declared In
IMBanner.h
– initWithFrame:placementId:
Initializes an IMBanner instance with the specified placementId.
- (instancetype)initWithFrame:(CGRect)frame placementId:(long long)placementId
Parameters
frame |
CGRect for this view, according to the requested size. |
---|---|
placementId |
the placement Id registered on the InMobi portal. |
Discussion
Initializes an IMBanner instance with the specified placementId.
Declared In
IMBanner.h
– initWithFrame:placementId:delegate:
Initializes an IMBanner instance with the specified placementId and delegate.
- (instancetype)initWithFrame:(CGRect)frame placementId:(long long)placementId delegate:(id<IMBannerDelegate>)delegate
Parameters
frame |
CGRect for this view, according to the requested size. |
---|---|
placementId |
the placement Id registered on the InMobi portal. |
delegate |
The delegate to receive callbacks |
Discussion
Initializes an IMBanner instance with the specified placementId and delegate.
Declared In
IMBanner.h
– getSignals
Get signals from the SDK. The signals will be asynchronously given via the gotSignals method on the IMBannerDelegate protocol.
- (void)getSignals
Discussion
Get signals from the SDK. The signals will be asynchronously given via the gotSignals method on the IMBannerDelegate protocol.
Declared In
IMBanner.h
– load
Loads a banner with default values.
- (void)load
Discussion
Loads a banner with default values.
Declared In
IMBanner.h
– load:
Loads a banner with a specified response.
- (void)load:(NSData *)response
Discussion
Loads a banner with a specified response.
Declared In
IMBanner.h
– shouldAutoRefresh:
Specifies if the banner should auto refresh
- (void)shouldAutoRefresh:(BOOL)refresh
Parameters
refresh |
if the banner should be refreshed |
---|
Discussion
Specifies if the banner should auto refresh
Declared In
IMBanner.h
– getAdMetaInfo
Contains additional information of ad.
- (NSDictionary *)getAdMetaInfo
Discussion
Contains additional information of ad.
Declared In
IMBanner.h