Created
September 25, 2014 19:16
-
-
Save flurrydev/b6767f90b7233ff1b0ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @interface MyDelegateClass : NSObject <FlurryAdDelegate> { | |
| // definitions | |
| } | |
| // MyDelegateClass.m | |
| @implementation MyDelegateClass | |
| -(void) init | |
| { | |
| [super init]; | |
| [FlurryAds setAdDelegate:self]; // Set the delegate | |
| } | |
| // Other code | |
| - (void) spaceDidReceiveAd:(NSString*)adSpace | |
| { | |
| // Show the ad if desired | |
| [FlurryAds displayAdForSpace:[self myAdSpace] onView:[self view]]; | |
| } | |
| - (void) spaceDidFailToReceiveAd:(NSString*)adSpace error:(NSError *)error | |
| { | |
| // Handle failure to receive ad | |
| } | |
| - (BOOL) spaceShouldDisplay:(NSString*)adSpace interstitial:(BOOL)interstitial | |
| { | |
| // Decide if the Ad should be displayed | |
| return true; | |
| } | |
| - (void) spaceDidFailToRender:(NSString *)space error:(NSError *)error | |
| { | |
| // Handle a failure to render the ad | |
| } | |
| - (void)spaceWillDismiss:(NSString *)adSpace | |
| { | |
| // Handle the user dismissing the ad | |
| } | |
| - (void)spaceDidDismiss:(NSString *)adSpace | |
| { | |
| // Handle the closing of the ad | |
| } | |
| - (void)spaceWillLeaveApplication:(NSString *)adSpace | |
| { | |
| // Handle the user leaving the application | |
| } | |
| - (void)videoDidFinish:(NSString *)adSpace | |
| { | |
| // Invoked only for rewarded ad spaces | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment