hey guys i am adding ads to my app
i have a tab bar application and put adds on three of the tabs
to do this i dragged a add from the libary to where i want it to be
for each view controller that corrisponded to the tab i made it a ad delegate imported the ad framwork and made it a property and IBOutlet, i linked everything up in interface builder the ad to delegate and delegate to add, but the ad only randomly runs on my device.. why? heres my code
i have a tab bar application and put adds on three of the tabs
to do this i dragged a add from the libary to where i want it to be
for each view controller that corrisponded to the tab i made it a ad delegate imported the ad framwork and made it a property and IBOutlet, i linked everything up in interface builder the ad to delegate and delegate to add, but the ad only randomly runs on my device.. why? heres my code
Code:
#import <UIKit/UIKit.h>
#import "TableViewController.h"
#import <iAd/iAd.h>
@class TableViewController;
@interface AddViewController : UIViewController <UITextFieldDelegate,ADBannerViewDelegate>
{
UITextField *nameField;
UITextField *descriptionField;
TableViewController *delegate;
ADBannerView *banner;
}
@property (nonatomic, assign) TableViewController *delegate;
@property (nonatomic, assign) IBOutlet UITextField *nameField;
@property (nonatomic, assign) IBOutlet UITextField *descriptionField;
- (IBAction)cancel:(id)sender;
@property(nonatomic, retain) IBOutlet ADBannerView *banner;
- (void)save;
- (void)cancel;
@end
Last edited: