0

I'm trying to make a shared iAd bannerview for the view controllers throughout my ios application. I've been attempting to make a singleton class in my app delegate in order to do this but I keep getting an error saying, "interface type 'iAdClass' cannot be returned by value." I have no clue how to fix this, my setup for a singleton may be incorrect also, so any help with that would be appreciated also.

#import <UIKit/UIKit.h>


@class ViewController;
@class iAdClass;

@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;

@property (strong, nonatomic) ViewController *viewController;

@property (assign) iAdClass*iADObject;
+ (AppDelegate*) sharedApplication;
+ (iAdClass)sharedAd;

@end
Dave123
  • 306
  • 2
  • 4
  • 13

1 Answers1

0

hi i did this it works but cant find how to remove adds if no internet connection

How to create a global reference for iAd and implement in multiple Viewcontrollers

Community
  • 1
  • 1
mrgonuts
  • 56
  • 5
  • Do you have a didFailToReceiveAdWithError method that's just not working? If that's the case you could try setting the adBanner off the screen(out of sight) by default in your viewDidLoad and then only have it appear when your bannerViewDidLoad method is called properly. That way it will be off the screen by default if for any reason an ad can't be displayed. – Dave123 Aug 10 '12 at 04:23