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:
+11
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user