iOS SDK  7.3.0
All Classes Files Functions Properties Pages
FlurryAdBanner Class Reference

Provides all available methods for displaying banner ads. More...

#import <FlurryAdBanner.h>

Inherits NSObject.

Instance Methods

(id) - initWithSpace:
 Initialize the banner ad object. More...
 
(void) - fetchAdForFrame:
 Retrieves an ad for this object using the adspace specified in the initializer routine. More...
 
(void) - displayAdInView:viewControllerForPresentation:
 Display an ad for this object that has been fetched earlier using fetchAdForFrame: More...
 
(void) - fetchAndDisplayAdInView:viewControllerForPresentation:
 Fetch and then display an ad for this object that has been fetched earlier using #fetchAdForFrame. More...
 

Properties

NSString * space
 Read only property that can be used to retrieve the ad space that was passed into an initializer routine. An Ad Space is an area within your app that is designated to display ads. Ad spaces need to be setup and configured on the Flurry developer portal. More...
 
FlurryAdTargetingtargeting
 This property should be used for ad targeting based on parameters such as location, targeting kewords and user cookies. More...
 
id< FlurryAdBannerDelegateadDelegate
 Sets the object to receive various delegate methods. More...
 
BOOL ready
 Returns if an ad is currently ready to display for this ad object. More...
 

Detailed Description

Provides all available methods for displaying banner ads.

Set of methods that allow publishers to configure, target, and deliver ads to their customers.

Note
This class depends on Flurry.h. For information on how to use Flurry's Ads SDK to attract high-quality users and monetize your user base see Support Center - Publishers.
Author
2009 - 2014 Flurry, Inc. All Rights Reserved.
Version
6.0.0

Definition at line 28 of file FlurryAdBanner.h.

Method Documentation

- (void) displayAdInView: (UIView *)  view
viewControllerForPresentation: (UIViewController *)  viewController 

Display an ad for this object that has been fetched earlier using fetchAdForFrame:

Since
6.0.0

This method will attempt to display the ad associated with the ad object.

See Also
- adBanner:adError:errorDescription: (FlurryAdBannerDelegate-p) for details on notification of failure to display ad.
@property (strong) FlurryAdBanner* adBanner;
- (void)fetchAd
{
FlurryAdBanner* adBanner = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_BOTTOM"];
adBanner.adDelegate = self;
[adBanner fetchAdForFrame:self.view.frame];
}
// Show whenever delegate is invoked
- (void) adBannerDidFetchAd:(FlurryAdBanner *) adBanner
{
// Received Ad
[adBanner displayAdInView:self.view viewControllerForPresentation:self];
}
@property (strong) FlurryAdBanner* adBanner;
// Alternatively, try to display at a certain point in the app
- (void) levelComplete
{
self.adBanner = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_BOTTOM"];
self.adBanner.adDelegate = self;
[self.adBanner fetchAndDisplayAdInView:self.view viewControllerForPresentation:self];
}
Parameters
viewThe UIView within which the banner will be displayed
viewControllerThe UIViewController to use for displaying a fullscreen when the banner is clicked.
- (void) fetchAdForFrame: (CGRect)  frame

Retrieves an ad for this object using the adspace specified in the initializer routine.

Since
6.0.0

This method will attempt to retrieve ads for this object's ad space from the Flurry server.

See Also
- adBannerDidFetchAd: (FlurryAdBannerDelegate-p) for details on the notification of ads being received.
- adBanner:adError:errorDescription: (FlurryAdBannerDelegate-p) for details on notification of failure to receive ads from this request.
- displayAdInView:viewControllerForPresentation: for details on displaying an available ad.
- (void)fetchAd
{
FlurryAdBanner* adBanner = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_BOTTOM"];
adBanner.adDelegate = self;
[adBanner fetchAdForFrame:self.view.frame];
}
// Show whenever delegate is invoked
- (void) adBannerDidFetchAd:(FlurryAdBanner *) adBanner
{
// Received Ad
[adBanner displayAdInView:self.view viewControllerForPresentation:self];
}
@property (strong) FlurryAdBanner* adBanner;
// Alternatively, try to display at a certain point in the app
- (void) levelComplete
{
self.adBanner = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_BOTTOM"];
self.adBanner.adDelegate = self;
[self.adBanner fetchAndDisplayAdInView:self.view viewControllerForPresentation:self];
}
Parameters
frameThe frame of the view within which the banner will be displayed
- (void) fetchAndDisplayAdInView: (UIView *)  view
viewControllerForPresentation: (UIViewController *)  viewController 

Fetch and then display an ad for this object that has been fetched earlier using #fetchAdForFrame.

Since
6.0.0

This method will attempt to fetch a banner ad from the FlurryAd server and display it within the view passed into this API.

See Also

- adBannerDidFetchAd: (FlurryAdBannerDelegate-p) for details on the notification of ads being received.
- adBanner:adError:errorDescription: (FlurryAdBannerDelegate-p) for details on notification of failure to display ad.
@property (strong) FlurryAdBanner* adBanner;
- (void)fetchAd
{
FlurryAdBanner* adBanner = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_BOTTOM"];
adBanner.adDelegate = self;
[adBanner fetchAdForFrame:self.view.frame];
}
// Show whenever delegate is invoked
- (void) adBannerDidFetchAd:(FlurryAdBanner *) adBanner
{
// Received Ad
[adBanner displayAdInView:self.view viewControllerForPresentation:self];
}
@property (strong) FlurryAdBanner* adBanner;
// Alternatively, try to display at a certain point in the app
- (void) levelComplete
{
self.adBanner = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_BOTTOM"];
self.adBanner.adDelegate = self;
[self.adBanner fetchAndDisplayAdInView:self.view viewControllerForPresentation:self];
}
Parameters
viewThe UIView within which the banner will be displayed
viewControllerThe UIViewController to use for displaying a fullscreen when the banner is clicked.
- (id) initWithSpace: (NSString *)  space

Initialize the banner ad object.

Since
6.0.0

This method initializes the ad object and gets it ready to fetch and serve a banner ad.

See Also
space for more description on the input parameter
FlurryAdBanner* bannerAd = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_AD"];
Parameters
spacerepresents the placement of the ad in your app. e.g. "MAIN_VIEW_BOTTOM_BANNER_AD".

Property Documentation

- (id<FlurryAdBannerDelegate>) adDelegate
readwritenonatomicweak

Sets the object to receive various delegate methods.

Since
6.0.0

This method allows you to register an object that will receive notifications at different phases of banner ad serving.

See Also
FlurryAdBannerDelegate for details on delegates available.
-(void) fetchBannerAd;
{
FlurryAdBanner* bannerAd = [[FlurryAdBanner alloc] initWithSpace:adSpace];
bannerAd.adDelegate = self;
[bannerAd fetchAndDisplayAdInView:self.view viewControllerForPresentation:self];
}
Parameters
delegateThe object to receive notifications of various ad actions.

Definition at line 78 of file FlurryAdBanner.h.

- (BOOL) ready
readnonatomicassign

Returns if an ad is currently ready to display for this ad object.

Since
6.0.0

This method will verify if an ad is currently available for this ad object. If an ad is not available, you can call fetchAdForFrame: to load a new ad.

Note
If this method returns YES, an ad will be available and the assetList will be populated. It is advisable to listen to the delegate adBanner:adError:errorDescription: (FlurryAdBannerDelegate-p) to get notified if the ad fetch request fails.
See Also
- fetchAdForFrame: for details on retrieving an ad.
@property (strong) FlurryAdBanner* banner;
- (void) showBannerIfReady
{
if ([self.adBanner ready] == YES)
{
[self.adBanner displayAdInView:self.view viewControllerForPresentation:self];
}
else
{
self.adBanner = [[FlurryAdBanner alloc] initWithSpace:@"BANNER_AD"];
self.adBanner.adDelegate = self;
[self.adBanner fetchAdForFrame:self.view.frame];
}
}
Returns
YES/NO to indicate if an ad is ready to be displayed.

Definition at line 116 of file FlurryAdBanner.h.

- (NSString*) space
readwritenonatomiccopy

Read only property that can be used to retrieve the ad space that was passed into an initializer routine. An Ad Space is an area within your app that is designated to display ads. Ad spaces need to be setup and configured on the Flurry developer portal.

Since
6.0.0
Returns
The ad space string value.

Definition at line 38 of file FlurryAdBanner.h.

- (FlurryAdTargeting*) targeting
readwritenonatomicstrong

This property should be used for ad targeting based on parameters such as location, targeting kewords and user cookies.

Since
6.0.0
See Also
FlurryAdTargeting for details.
Parameters
targetingThe ad targeting object.
Returns
The ad targeting that was orignally set or nil if never set.

Definition at line 55 of file FlurryAdBanner.h.


The documentation for this class was generated from the following file: