AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
01/23/15 02:07 PM (9 years ago)

Interstitial placement IOS Quiz?

Hi, I am trying to add an admob interstitial to an app that uses the standard interactive quiz plugin. I thought the best time to show it would be when the user wants to Quit the quiz (from the pop-up dialogue), but I can't quite figure out where to place the code. I've managed to get an add to show when the user taps quit. When the ad completes, the user is navigated to the right screen, but the pop up dialogue remains on display. I think it has something to do with navLeftTap, but I am not a programmer so any tips would be much appreciated. Alan
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
01/24/15 06:39 AM (9 years ago)
I like to get the interstitials to pop after the last question but before the final score is shown. When it comes to ad mob ads there are 3 functions you'll need to add. Don't remember the names of the methods. But the first one is to create the ad object. Put that in either viewDidLoad or viewDidAppear. The second function makes a request to admob for the ad. Put this in viewDidAppear. The third one displays the ad. Put this one towards the beginning of the quizEnded method.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/24/15 10:43 AM (9 years ago)
Thanks @nadthevlad, tried that and it shows the interstitial, but I also have the popup dialogue box showing (the score and quit try again options called the actionsheet?) on display over the interstitial. If I click on a button in that box, then close the interstitial, the box then comes back afterwards, which is mesing up the navigation. It almost seems as if I need to hide that box behind, or make the interstitial come up in front of it. I've spent hours on this, but don't seem to be able to quite crack it.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
01/24/15 10:54 AM (9 years ago)
Best I have achieved is to put the display code in viewDidAppear, but that only shows when doing a quiz the first time, but not when trying again.
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
01/25/15 07:07 PM (9 years ago)
I forgot about the actionsheet. Been awhile since I used that one.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.