0

I would like to provide an in-app purchase to unlock all features which includes hiding the iAd bannerView.

I currenlty have the bannerView set as a property, but when I try to set the view to hidden, it doesnt disappear.

I've also tried [bannerView removeFromSuperView] and it's still visible. I've tried moving it off the screen by changing it's x,y coords.

The view's place holder is in my XIB and confirmed it's wired up to my property IBOutlet *bannerView.

Does the bannerView not behave like normal views? Is this sort of thing not allowed?

if(isFullVersion)
{
    removeAdsButton.hidden = YES;
    bannerView.hidden = YES;  // DOESNT WORK
    [bannerView removeFromSuperview]; // DOESNT WORK
}
user7388
  • 1,741
  • 2
  • 19
  • 25
KevinS
  • 598
  • 4
  • 18
  • 1
    It behaves exactly like normal views; the problem must be elsewhere. What do you get if you log `self.bannerView.superview` and `self.view.subviews`? – Tommy May 10 '13 at 07:08
  • Ok, that was easy.. I had an [[ADBannerView alloc] init] in my didLoad that was probably breaking the IBOutlet connection.. ?.. I just commented that out because I set the View in the XIB to be a ADBannerView type so it got alloc'd already. Thanks for the "elsewhere" reminder... – KevinS May 10 '13 at 07:15
  • Yes — if you had `bannerView = [[ADBannerView alloc] init]` then you'll no longer have a reference to the original banner view but it'll still be on screen since you never asked it to `removeFromSuperview`. – Tommy May 10 '13 at 19:24

0 Answers0