Search code examples
iosobjective-cios8iadsize-classes

Renewed xib with Size Classes not showing iAds in iPhone 6 and iPhone 6 Plus


I need to update my old application to support iPhone 6 and iPhone 6 Plus devices. After few changes and adding images with @3x size all interface looks good now, but I have noticed that when I check "Use Size Classes" inside the xib file I can no longer see iAds in iPhone 6 and iPhone 6 Plus. All other devices shows ads normally. For testing I'm just using simple line of code to support ads:

  self.canDisplayBannerAds = YES;

Inside the xib file I have only navigation bar, date time picker and few labels. There are no visible elements that can hide banner. I had also other VController with xib file, but I've changed it to the controller without xib with programmatically implemented view elements, so it shows ads now. Interstitial ads loads without problems in all view controllers. Does anybody had the same problem and knows how to solve it?


Solution

  • I found the solution by myself. When using xib file and using

    self.canDisplayBannerAds = YES;
    

    in my situation I moved this command from viewDidLoad to viewDidAppear and banner showed up. Now I can see banners in all devices.