first draft of ad code for iOS. Not adding admob/adwhirl/adSesnse libs to this commit. You will need to download them to get the port to build under XCode

This commit is contained in:
techdragon.nguyen@gmail.com
2011-12-08 20:50:36 +00:00
parent 69a0323c86
commit fe78345ef7
13 changed files with 726 additions and 114 deletions
+11 -3
View File
@@ -1,13 +1,18 @@
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "AdWhirlDelegateProtocol.h"
#import "EAGLViewController.h"
#import "ESRenderer.h"
// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
// The view content is basically an EAGL surface you render your OpenGL scene into.
// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
@interface EAGLView : UIView
@interface EAGLView : UIView<AdWhirlDelegate>
{
AdWhirlView *adView;
//This is a trick, AdMob uses a viewController to display its Ads, trust me, you'll need this
EAGLViewController *viewController;
@private
id <ESRenderer> renderer;
@@ -21,7 +26,7 @@
id displayLink;
CGPoint currentLocation;
}
@property (nonatomic, retain) AdWhirlView *adView;
@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
@property (nonatomic) NSInteger animationFrameInterval;
@property(nonatomic, readwrite) CGPoint currentLocation;
@@ -30,4 +35,7 @@
- (void)stopAnimation;
- (void)drawView:(id)sender;
- (void)removeAds;
- (void)displayAds;
@end