Quote:
Originally Posted by tsansone
Hello, I am very new at developing for the iphone but have managed to get the AdMob code working in my normal views. But a portion of my app is in Tables. When I add the code to the tables it does work but the first record is always cut off. I tried using your method from above, but I think some steps were left out.
I am getting the following errors after using your code:
error: 'adMobAd' undeclared (first used in this function)
error: 'AdMobView' undeclared (first used in this function)
error: request for member 'tableView' in something not a structure or union.
Any help would be appreciated.. Baby steps would help too
Thanks
|
It looks like you didn't declare anything in your .h file!
Something like this might help:
Code:
#define AD_REFRESH_PERIOD 60.0 // display fresh ads once per minute
#import <UIKit/UIKit.h>
#import "AdMobDelegateProtocol.h";
@class AdMobView;
@interface AdViewController : UIViewController<AdMobDelegate> {
AdMobView *adMobAd; // the actual ad; self.view is a placeholder to indicate where the ad should be placed; intentially _not_ an IBOutlet
NSTimer *refreshTimer; // timer to get fresh ads
}
- (void)refreshAd:(NSTimer *)timer;
@end
Take a look at the AdMob sample app that comes with their SDK. That will help a lot.