iAD problems

Discussion in 'iPhone/iPad Programming' started by ljg93, Apr 27, 2011.

  1. ljg93, Apr 27, 2011
    Last edited: Apr 27, 2011

    macrumors member

    Joined:
    Mar 13, 2011
    #1
    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

    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
    
    
     
  2. macrumors regular

    Joined:
    Aug 26, 2010
    #2

    I would suggest looking over the documentation. In any event this is normal behavior.
     

Share This Page