0

Im using startApp to display ads but when the view disappears it doesn't show the ad. I have startAppAd = STAStartAppAd() in viewDidLoad() I'm not quite sure what is going wrong.

override func viewDidAppear(_ animated: Bool) {
        startAppAd?.load()
    }

    override func viewDidDisappear(_ animated: Bool) {
        super.viewDidDisappear(animated)
        startAppAd?.show()
    }
tHatpart
  • 1,302
  • 3
  • 12
  • 27

1 Answers1

0

viewDidDisappear is called when the vc is about to dimiss or popped , so any property is in it's way to deallocate if that vc is not strongly linked , so move the show method also inside viewDidAppear or in the ad load finish callback if any

Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87